LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Using "Case structure" for indicate the data value in different statement

Hello everyone!

I have 2 parameters(Dose, Energy) and 3 statements of "Case structure": 15,16,17.

 

In the first statement I need to find out only the "Dose".

in the second - Energy

in the third - Dose and Energy. 

The problem is that for every statements I have to determine the value for every parameters, but I need to save the last update for parameters. 

How can I solve this?

Download All
0 Kudos
Message 1 of 3
(1,717 Views)

I suggest you take a step back and go through some of the LabVIEW training.

 

Which by the way is all FREE through at least the end of May.

 

Even if you miss out on the in depth training, I believe even the free LabVIEW tutorials will benefit you.

 

As it appears to me you do not understand how to use While Loops and that is a very basic LabVIEW concept. 

========================
=== Engineer Ambiguously ===
========================
0 Kudos
Message 2 of 3
(1,667 Views)

I see an issue with the VISA Read.  When I see someone using Bytes at Port, they are probably doing something wrong because 99% of the time Bytes at Port is unneeded and they just don't understand their device's communication protocol.

 

In this case, it looks like you are dealing with binary data since you are just combining bytes and displaying their U16 values.  But you configured this serial port to use a termination character of 10 (dec), a line feed by default, since you didn't wire those inputs.  So if any byte is a value of 10, the read will end prematurely at that byte.

 

So I think you will want to disable the termination character.  And read up on the communication protocol  You can probably get rid of the "Bytes at Port" if you device always returns the same number of bytes.

 

PS:  Index Array is expandable,  just drag down the bottom border to get more outputs,  by default, you'll get successive values in the array when you don;t wire the index input.  And if you don't wire the first one, it will start at index 0.

0 Kudos
Message 3 of 3
(1,630 Views)