11-08-2012 05:39 AM - edited 11-08-2012 05:42 AM
Hi everyone!
I'm a Labview beginner and currently dealing with a priori easy business. Recently I got a USB Relay Module to be incorporated in an alarm system. Let's say if one gets a certain value bigger than other, the relay should close and activate a siren (see example attached). For this I've used the DAQ assistant and configured one of the module output channel. By using a simple boolean switch, I can easily close and open the relay. However, if I use a case structure, an error is obtained, as the DAQ Assistant for one output can be only used once. I mean, if the relay is closed and I'd like to get back the original situation, i.e. opened relay, what should I do?
Schematically:
-if A>B, then closed relay
-if A<B, then opened relay
Sorry for the messy explanation, but I think you get the point.
Thanks in advance
Solved! Go to Solution.
11-08-2012 06:39 AM
Hi Henry
I'm not sure that I fully understand your question and the code you've attached only functions to switch a single output on.
Have you looked at the digital output examples included with LabVIEW? I think you need to use the DAQmx functions palette to continuously write either 0 or 1 to your output.
If you provided some more complete code I can help further.
Kind regards
11-08-2012 07:37 AM
I just got it. The problem was that in the main vi, not in the example I attached, the same output via DAQ Assistant was configured for two different case structures. Obviously the relay module was going completely mad, since I had two independent pairs of TRUE and FALSE working at the same time. If I get, for instance, TRUE for one case structure and FALSE for the other, the switch doesn't know what to do. Hope now it's clear...