LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling the 9481 relays

I am having difficulty setting up a 9481 relay module to turn the relays on and off at specific times.  I want to turn on each of three relays for 4 seconds each, but stagger their starting times.  I have what appears to be an easy method for creating a 2D U32 array of 0's (off) and 1's (on) corresponding to the correct moment in time when the relays need to switch.  I can successfully display the array data on a chart showing exactly what I want to happen.  I can even wire the 2D array to the DAQmx Write function but it will not run (simply get a timeout error).

 

Can anyone off a suggestion on what I'm doing wrong here?  I have attached the LabVIEW 8.2 VI (as messy as it is!) and I'm using the 9481 module in a 9172 chassis

 

I also converted each of the three individual relay U32 arrays into a digital array, but can's figure out how to combine these three into a single 1D waveform (thinking this would be a better method because the data is so much simpler, but I suspect I need to use a bit pattern instead of just 0 and 1).  Are the four LSB's correspond to the four relays of the 9481 module?

0 Kudos
Message 1 of 3
(2,473 Views)

Try making the timeout on the Digital Write longer than 7 seconds.  It looks like you are trying to write 7 seconds worth of data, and with a 7 second timeout, you might be coming up just a fraction of a second short.

 

You can use Build Array on your digital waveforms to create a 1-D array of them.

0 Kudos
Message 2 of 3
(2,464 Views)

The original version used a timeout of 20 seconds with a nominal 10 seconds worth of contol time for the relays and still encountered a timeout error and no activity with regard to the relays.

 

I did manage to get the three U32 arrays into a single highly compacted 1D digital waveform (see attached jpeg) so I will try that data type this morning.  Since the module has only 4 lines on it I assume the four LSB's in the waveform correspond to the four relays and anything geater than the fourth bit is ignored, is that correct?

 

 

0 Kudos
Message 3 of 3
(2,455 Views)