LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How can I recognize a particular order of four outputs to be a correct one?

I have a fairly simple task of generating four input signals and watching the outputs.  It seems simple anyway.  I am using a DAQPAD for the I/O monitoring.
I am trying to make sure that outputs 1, 2, 3 and 4 follow a particular sequence when I trigger my inputs.  Unfortunately, I can’t seem to figure out how to do this.  I am hoping that you can suggest some kind of example file that recognizes an output pattern.
0 Kudos
Message 1 of 5
(2,945 Views)
In LabVIEW, the order of tasks is preferably given by the data flow. It can also be forced by e.g. using a sequence structure.

Could you explain in a little more detail what you mean by "particular sequence", what kind of timing. Maybe attach a small sample.

Something sounds backwards. You can only recognize an input pattern, an output pattern must be locally generated by your program. Please explain.
0 Kudos
Message 2 of 5
(2,938 Views)
I am sorry, my mistake. I am pretty new at Labview. I am generating an output signal with labview to a PCB and I am trying to read back its response. The response "outputs" would then be considered inputs from the perspective of Labview. I look at it from the PCB point of view, which has inputs and outputs, and so you can probably see where I was mixed up. I use a sequence to generate the outputs going to the PCB. I want to make sure that the correct pattern of responses is given. In this case, I have Relay A and B. When I activate Input 1, I should then get the activation of Relay A N.O. and Relay B N.C., a pause, and then visa versa. When I activate Input 2, I should receive Relay A N.C. and Relay B N.O., and then again, after a pause, visa versa. Input 3 is only to see Relay A N.O. and Relay B N.C. activated, while Input 4 should see Relay A N.C. and Relay B N.O. activated. I need to somehow "watch" the order of the relay logic activations and make sure they are in order. I am able to access the state of each N.O. and N.C. contact. I attached a sample .vi with other garbage in it that you can ignore. (The programming is done on a laptop with Labview and not the computer that I am using at the moment, and so it is not as easy for me to remove code.) The top of the block diagram shows the sequence that I use to trigger my DAQPAD, which is attached to my PCB.

I greatly appreciate your help in this matter,
-Zack
0 Kudos
Message 3 of 5
(2,926 Views)
yep, I forgot to attach it.
0 Kudos
Message 4 of 5
(2,923 Views)
Hello Zack,

If I understand very well, there are a certain number of relays that you would like to monitor so that the sequence in which they are turned on can be recorded. I am not sure how your system is clocked, but you could read all the relays in a port (depending on the hardware you are using) and your system clock to read values. This will allow you to buffer the values read and check them in software against some preset expected pattern.
For example, if you have 3 relays, that gives you 8 possibilities. Everytime you read the values from the relays, you could convert to a binary and to a decimal number that you can compare with an expected value.
0 Kudos
Message 5 of 5
(2,905 Views)