LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Return "Nothing" or skip in a case structure

Hi.

I am using a case structure to read data from PIC MCU. As some of the data is not relevant to the current program, I would like to skip those frames.

I am using case structure to detect the first byte in the packet (TRUE) which is necessery for my application and then put the data into an indicator. While the case structure is FALSE, I still receives zeros in the data over the loop. Is it possible to skip the FALSE iteration in connection to adding data to the indicator? I tried to use "NaN" but it is not working well when I am trying to create a graph from that indicator's data.

 

Thanks.

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

Hi,

 

THINK DATAFLOW!

When you have output tunnels in your structure you need to have an output value each time that structure executes. DATAFLOW!

 

You mention "iterations": use a conditional output tunnel on your loop to ignore "FALSE iterations"…

Best regards,
GerdW


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

Please attach your Vi instead of a trucated picture with important parts missing and most code (e.g. the content of the other cases) hidden.

 

(If you set a different color depending on the case, the property node belongs after the case structure. It only needs to be written if the new color is different, and not with every iteration of the loop.)

 

You seem to have charts connected after the ptbypt means. Is that what you mean by "graphs"? If they should not update, you can place them inside another case structure.

0 Kudos
Message 3 of 3
(3,461 Views)