%{ #include #include "dm5406.h" %} /* Conversions */ TM typedef unsigned short UINT { text "%5u"; } TM typedef unsigned short SINT { text "%5d"; } TM typedef unsigned long ULONG { text "%9lu"; } TM typedef unsigned char UCHAR { text "%08b"; } TM typedef unsigned char USCHAR { text "%3u"; } TM typedef double VOLTS { text "%6.3lf"; } TM typedef double TORR300 { text "%6.2lf"; } TM typedef double TORR100 { text "%6.3lf"; } TM typedef double TORR1000 {text "%6.2lf"; } TM typedef unsigned short USTAT { text "%04x"; } TM typedef float SFLOAT { text "%9.4f"; } /* Collection Types */ TM typedef UINT Ct16 { } TM typedef ULONG Ct20 { } TM typedef UINT AD12 { collect x = sbw(x.address); convert VOLTS; text "%6.4lf"; } TM typedef UINT AD12U { collect x = sbw(x.address); text "%6.3u"; } TM typedef UINT DM_AD12 { collect x { int i; for (i = 0; i < 4; i++) DM_Read_AtoD( x.address ); x = DM_Read_AtoD( x.address ); } } TM typedef DM_AD12 DM_AD1210V { convert VOLTS; text "%6.3lf"; } TM typedef DM_AD12 DM_AD125V { convert VOLTS; text "%6.3lf"; } TM typedef AD12 P300TORR { convert TORR300; text "%6.2lf"; } TM typedef AD12 P100TORR { convert TORR100; text "%6.3lf"; } TM typedef AD12 P1000TORR { convert TORR1000; text "%6.2lf"; } TM typedef UINT DM_DA125V { convert VOLTS; text "%6.3lf"; } /* Calibrations */ Calibration (AD12, VOLTS) { 0, 0, 65536, 10.0 } Calibration ( DM_AD125V, VOLTS ) { 0, 0, 4096, 5.0 } Calibration ( DM_AD1210V, VOLTS ) { 0, 0, 4096, 10.0 } Calibration ( P300TORR, TORR300 ) { 0, 0, 65536, 300.0 } Calibration ( P100TORR, TORR100 ) { 0, 0, 65336, 100.0 } Calibration ( P1000TORR, TORR1000) { 0, 0, 65536, 1000.0 } Calibration ( DM_DA125V, VOLTS ) { 0, 0, 4096, 5.0 }