06-16-2011 12:05 PM
I'm looking for a vi a "timer" to make. I know there is a function to the time clock of the computer to read but now I'm looking for a vi that is complete for a day switching. I eventually want a digital output of the trigger 6009 and iput to a solid state relay.
Nowhere can I find examples, just only start stop timers.
Solved! Go to Solution.
06-17-2011 04:58 AM
Dear Walber,
thank you so much for your post on our webforum. I've made an example where you can set your time target in hours minutes and seconds; if the time has elapsed the boolean output can be used to control the digital output from your DAQ device. Please find the attached zip file; the timerexample.vi is the main vi.
Best regards,
06-18-2011 12:10 PM
Thanks, but its very difficult. I have got an example from someone in lvug.nl that works, i can set an in time and out time but how can i trigger one digital output of the usb 6009
The attachment is the timer program that is working but i need a connection to the 6009
06-20-2011 01:39 AM
Dear Walber,
You can take the boolean indicator as digital ouput line for your USB DAQ device. It is best to take an example of the example finder to start with. Chose help => find examples and here the browse tab. Chose here hardware in and output => DAQmx => Digital Generation => Write Digital Chan.vi
With the example multiple channels are used you can change the ploymorphic selector of the DAQmx write.vi to digital output => single channel => single sample == boolean.
I adjusted your vi,
best regards,
06-21-2011 12:18 PM
How can i edit the daq vi's? (how can i set the outports (a0 1-9) They are only icons, but i cannot open them.
06-22-2011 01:47 AM
Dear Walburg,
I'm not sure what you are trying to achieve, do you want to select multiple digital channels? You can put the right syntax in the DAQmx Physical channel control on your front panel. You also need to adjust the right mode of the DAQmx write VI; so multiple digital outputs (please see selectdo.jpg); the DAQmx write VI suspects now an array of booleans instead of a single boolean element. Please remember to offer the right size array; I adjusted the example with digital output 0 : 3 so we need to offer an array with 4 elements to the DAQmx write.vi.
You should never edit the VI's from the drivers.
Best regards,
06-22-2011 12:45 PM
Yes that is working, when i set the time i get an output (digital meter on 20 and 32.
Now i am going to find out to put more of this vi's together (With the same usb 6009) timer / lm35 temp and hygro hih4000 measurement.
06-30-2011 11:54 AM
This is working, but i tried to copy this routine to make 3 timers but that doesnt work, Is there any way to change this example to make this for 3 outputs?
07-01-2011 01:38 AM
Dear Walberg,
did you create a sub VI of the time out part within the even structure? So don't put the event structure in a sub VI. Besides that; if you want to use the sub VI's in parallel you are able to change the execution of the sub VI to reentrant. In the sub VI go to file => VI properties, chose execution from the category pull down and checkmark reentrant execution.
Best regards,