how to write control in DAQ factory software


Recommended Posts


I am very close to getting U3-HV labjack. In my design, I have 4 pressure transducer for data log and 20 solenoid vavles to control. Let's say I have V1-V20 (solenoid valves). Every 30 minutes, some of them need to be closed and opened.

How could I write to control that? Could it be possible to do sub-routine in DAQ factory software? I know they have a function for timer.

But explantion or example would be good.



Link to comment
Share on other sites

This is actually largely covered in the help and the DAQFactory-LabJack app guide and is easy to do once you have the hardware to see it. You don't want to use the LJ timer, that's for something else. You just need a simple sequence (after creating your 20 channels). I'll assume you created V1 and V2 for two of the digitals and you want to toggle them on and off every 30 minutes:

// init to default values: 0 = off, 1 = on
v1 = 0
v2 = 1
// loop forever:
while (1)
   // delay 30 minutes
   // toggle values: ! means "not" which sets it to the opposite state.
   v1 = !v1
   v2 = !v2

Link to comment
Share on other sites


This topic is now archived and is closed to further replies.