Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

timer vi

Solved!
Go to solution

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.

 

0 Kudos
Message 1 of 9
(4,973 Views)

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,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 2 of 9
(4,961 Views)

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

0 Kudos
Message 3 of 9
(4,944 Views)

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,

Martijn S
Applications Engineer
NI Netherlands
Download All
0 Kudos
Message 4 of 9
(4,930 Views)

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.

0 Kudos
Message 5 of 9
(4,910 Views)
Solution
Accepted by topic author walberg

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,

Martijn S
Applications Engineer
NI Netherlands
Download All
0 Kudos
Message 6 of 9
(4,897 Views)

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.

0 Kudos
Message 7 of 9
(4,884 Views)

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?

0 Kudos
Message 8 of 9
(4,805 Views)

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,

Martijn S
Applications Engineer
NI Netherlands
0 Kudos
Message 9 of 9
(4,797 Views)