LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

arrays

In the attached file , I want to to how how to correct the logical and runtime error .. I need the upper  enum "s0/s1/s2/s3" to be connected to the lower "s0/s1/s2/s3" .

I want this example to rus as follows .. if session in binary = s2 then s2 outputs 11 so the appended array must have 2 bits for the command "00" and the output from session in binary "11" according to the lower enum

Download All
0 Kudos
Message 1 of 7
(2,544 Views)

Something like this?


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 7
(2,529 Views)

yes can you send me the VI itself but but my labview version is 13.0 ? what was the error in my code ?

0 Kudos
Message 3 of 7
(2,525 Views)

@MarinaNashaat wrote:

what was the error in my code ?


Trying to make things way more complicated than they needed to be.  Personally, I would do the combining in the integer format and then change into the Boolean array (like in the attached).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Download All
0 Kudos
Message 4 of 7
(2,518 Views)

But I need to do it with case structure and for every input 00/ 01/ 10 /11 will go a specific state s0/s1/s2/s3 and in each state will do something else so how to connect the enum with the case structure ?

0 Kudos
Message 5 of 7
(2,506 Views)

Hi Marina,

 

how to connect the enum with the case structure ?

Well, start by wiring the enum to the selector input of the case structure…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 6 of 7
(2,472 Views)

Why must you use a case structure?  And why do you need to go through another data type?Does my code not give you the right answer?  My point is that you can do the process on the original enum value and simplify things.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 7 of 7
(2,461 Views)