LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I have a cDAQ-9174 with a 9481 module. How do I control the relays using a waveform?

I have a cDAQ-9174 with a 9481 module.  How do I control the relays using a waveform?
0 Kudos
Message 1 of 10
(3,664 Views)
Sorry, but you'll need to provide more information. What waveform? Have you installed DAQmx? Have you looked at the examples that ship with it? There are lots of examples on controlling hardware.
0 Kudos
Message 2 of 10
(3,660 Views)

I have installed DAQmx but I can't seem to find any examples for controlling the 9481 module.  I can switch the relays using a boolean control but I thought there may be a faster way like send a waveform pulse.  I need the relay to switch on for .05 seconds and off for 1 second.  Is there a way to do this using a waveform?

0 Kudos
Message 3 of 10
(3,653 Views)
No, you cannot use a waveform. Look at the specs again. The module only supports software timing. What kind of tolerance do you have on the switching times? Why do you think your current approach is too slow?
0 Kudos
Message 4 of 10
(3,642 Views)
I,m not sure what tolerances my switching times will be yet.  I am switching 110 volts to a spool valve to control water pressure in a manifold.  My first approach was to use a sequence structure, in the first frame turn on the relay, the second frame use a timer delay and the third frame turn off the relay.  I was looking for a way to do the same thing using a waveform.
0 Kudos
Message 5 of 10
(3,634 Views)

You actually can use a waveform with the NI 9481.   What API are you using?  In LabVIEW you can use Cont Write Dig Port Int Clk.vi or one of the other similar timed digital examples.

 

Your sample clock is going to have to be slow though.  If you attempt to switch faster than specified by the module the relays will not switch and you will receive no notification that you are going too fast.

 

 

 

0 Kudos
Message 6 of 10
(3,618 Views)
I thought you would get an error if you attempted to use a clock with digital I/O that is only software timed?
0 Kudos
Message 7 of 10
(3,616 Views)

You do get an error if you attempt to configure hardware timing on a module that supports only software timing.  The NI 9481 in a Compact DAQ chassis supports hardware timing as well as software timing.  Where are you seeing that it only supports software timing?  I'd like to make sure the documentation is correct.

 

Just to verify we didn't break anything I ran the example I mentioned in a NI 9481 in a cDAQ-9174 chassis at 1Hz and the relay is happily clicking away.

 

The general rule for whether or not a digital module supports hardware timing is the number of lines.  

 

>8  software timing only in Compact DAQ

<=8 hardware and software timing

 

Now that's not an official rule and could change in the future (which is probably why the documentation lists them individually) but it is correct for all currently shipping modules.

Message 8 of 10
(3,612 Views)
Sorry, I totally missed the cDAQ part. I just looked up 9481 and wetn to the USB-9481 page.
0 Kudos
Message 9 of 10
(3,606 Views)
Thanks for the help....I found the example programs.  I should be able to make something work now.
0 Kudos
Message 10 of 10
(3,588 Views)