LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to maintain the Boolean LED ON after receiving "1" from VISA serial

Hi! This is my first time using LabVIEW, I need to simulate LED indicators because I will simulate a semaphore IoT with an esp8266, but I got stuck at this point.

lissetha_0-1724730887652.png


I'm sending "1" from serial port to make the boolean indicator blink, and that works, but following this post I'm trying to use a shift register to keep the LED on untill the "1" from the serial port changes to "0".

This is what I have so far:

lissetha_1-1724731183634.png

The problem is that when I run this, and I get the probe watch window on the output of the Read VISA module it says "not executed", even if I make sure I'm runing the esp code, so I don't get any output on the boolean indicator

lissetha_2-1724731281805.png

I appreciate any insights or feedback you can provide, thanks in advance! 

0 Kudos
Message 1 of 4
(303 Views)

Get rid of the inner loop and anchor the shift register on the outer loop.

Simplify!

 

(Sorry, we don't "debug" pictures. If you want specific help, attach your VI. Make sure to "save for previous, 2020 or below, if you use a recent LabVIEW version. There are plenty more things quite questionable.

Message 2 of 4
(268 Views)

It actually worked with the outter loop tysm I didn't know I could attatch vi files either.

I have one more question, if I want to add more boolean indicators, in order to make it like a semaphore, if each one needs their own shift register, I need to add and anchor each of these shift registers to the same loop right?

I'll attatch the .vi in case it's useful to anyone

0 Kudos
Message 3 of 4
(225 Views)

Hi lissetha,

 


@lissetha wrote:

I have one more question, if I want to add more boolean indicators, in order to make it like a semaphore, if each one needs their own shift register, I need to add and anchor each of these shift registers to the same loop right?


You could use a cluster "to bind them all"!

 

Using a cluster you can collect all your booleans into one data structure and still need only one shift register to hold that cluster.

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(217 Views)