LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Is there the assignment operator?

Suppose a case structure. If (case 1) then variable 1 is processed. If (case 2) I want to assign value 0 to variable 1. Is there the assignement operator?
0 Kudos
Message 1 of 5
(3,167 Views)
Yes, the wire is the assignment operator.

Inside of each case, put a constant value that you want to assign to the variable. Wire the constant to the edge of the case statement, and it becomes an ouput. Then wire the output to the variable you want to assign the values to.

Note that every case must assign a value to the output of the case statement.
Message 2 of 5
(3,167 Views)
Here is another example using local variables which is more similar to convential programming languages, where case statements don't have an output.
Message 3 of 5
(3,167 Views)
Thank U very much for your answer. You have been extremely clear. I have got another question on the same topic. I need an assignment operation but I don't have a case structure. The fact is I want to assign value 0 to an absolute time data. At the moment I get this with a subtractor.
0 Kudos
Message 4 of 5
(3,167 Views)
You mean you want to replace the t0 with constant 0 in the waveform? The VI shows you how to do it.

JG
0 Kudos
Message 5 of 5
(3,167 Views)