03-06-2013 04:17 PM
Hello Everyone,
Can anyone please tell me how to program a simple relay ON/OFF automatically using DAQ assistan? I want that the relay switches for each second to the other relay automatically (I have four relays side by side) ? should I use DAQmx write.vi or DAQmx read.vi?
BR
03-06-2013 04:24 PM - edited 03-06-2013 04:28 PM
What are you connecting the relay to? Most DAQ cards do not have the drive capability to operate most relays. I say most, because there are relays that can be driven directly, and there are DAQ cards with sufficient drive capability to operate _some_ relays. As to whether to use read or write, you are trying to "output" a signal, or "write" an output, to the device. You say switches to "the other relay", are you trying to switch back and forth between two relays or just switch one on and off, or is it between two relay positions. A simple loop with the DAQ vi that controls the pin driving the relay, with a shift register on the loop, pass a boolean into the shif register at the start, pass that value into the DAQ vi, invert the signal and connect to the shift register on the right side of the loop. Now, on every iteration of the loop, the value to the DAQ will switch. Put a timer in the loop, wired with what ever loop time you want.
03-06-2013 04:42 PM
Hello LV-pro,
At first I want to read a Signal for one sec. from relay 1, then output this signal and switch automatically to the second relay should the same thing happend as in the Relay 1 ( Signal input for one sec. output this signal and then switch autmatically to the third relay...etc)
03-06-2013 04:56 PM
I have Idea: at first Create Channel -> Clock-> start task -> ( in loop Read.vi -> Write.vi) -> clear.. Ist it right? But how I can doing to switch automatically to the other relay?
03-06-2013 05:31 PM
Now you say you want to read. Read what?
I have no idea what you mean by 'Clock'.
How are your relays connected. Digital outputs? Are they sequentially wired? You can walk a pattern to four outputs (i.e. 0001,0010,0100,1000).
03-06-2013 06:05 PM
Hello Deniss,
I have more Input Signal and only one output, my relay are sequentially wiredand. with this realy I can define which input signal I want read it . in each relay is one Input signal connected. So i want to read the Singal from each relay for one sec so I think i can use sample clock , After read the signal from one relay i want to output this signal immediately so i thnik i can use Write.vi after read.vi? is´nt true?
BR
03-06-2013 08:06 PM