From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
08-09-2012 01:54 PM
Hi all,
I have a case structure. Based on whether the case is t/f I would like to change the value of two variables. If I put the two variables in the true part of the case strcture they can't be in the false part. How would I assign them values outside of the case structure? Could I refer to them numeorus times in the different cases? Thanks.
Solved! Go to Solution.
08-09-2012 02:00 PM
Couldn't you simply assign the values inside the structure, and put the variables outside to the right?
Im afraid im not 100% sure what you are asking.
Like this?
08-09-2012 02:05 PM
Here's the part of the code. Basically I have 4 values. I then compare two in order to determine which values to use. Should for example the value on left be greater, I want to write the two left values to a pair of vairables. Should the value on the right be greater I wish to write the two values on the right to the pair of vairables mentioned previously. I tried writing them in a case structure but I couldn't put the variables in both the true and false part of the case structure.
08-09-2012 02:21 PM
Bascially I would like to say in pseudo code if the four top values are w/x and y/z and the two new values are a/b
if w > y
a = w
b = x
if y > w
a = y
b = z
08-09-2012 02:29 PM - edited 08-09-2012 02:29 PM
So something like this?
08-09-2012 02:33 PM
Yes! Exactly what I was looking for. Thnaks!
08-09-2012 02:34 PM
Crap, crossrulz just barely beat me to it...
08-09-2012 02:37 PM
@NateTheGreat wrote:
Crap, crossrulz just barely beat me to it...
Yeah, I'm having fun this week. Altenbach normally just beats me. But he's busy having fun at NI Week and so I manage to get solutions in.