10-22-2011, 07:23 PM
Probably cannot be opened/closed two times in process. For easier testing, run in separate process.
or
Macro Macro1569
or
Macro Macro1569
out
dll K8055D
,#OpenDevice CardAddress
,CloseDevice
,OutputAnalogChannel Channel Data
,WriteAllDigital Data
,ClearAllDigital
int+ g_kit
if(!g_kit)
,g_kit=OpenDevice(0)+1
,if(!g_kit) end "error"
,;or put this code in a function that runs at startup
WriteAllDigital(9)
;CloseDevice ;;call it when QM exits, for example in a function with trigger "QM events -> file unloading", or from a destructor of a global variable.