LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

LED indicator --

So I have parsing data from serial port and every new frame basically has a value for a particular sensor. 

I just want to have an indicator LED next to active sensor data i.e if current packet has frame for Temp then temp led shoudl light up next to parsed value...

This is helps in knowing which value is currently being updated . Is there a way??

Thanks

0 Kudos
Message 1 of 8
(3,658 Views)

Yes! There are several ways. It depends on the format of your data. Matching a regular expression is one way. A simple string search is another. If you show the code you have so far it will help narrow down the options.

0 Kudos
Message 2 of 8
(3,653 Views)

Thanks

But all I need is whenever a new value arrives  , an LED next to it blinks...

parsing of values is already done ....can it be done at form end??

0 Kudos
Message 3 of 8
(3,651 Views)

When you say, can it be done at form end, that is too little information. What Todd is saying is that you need a way to identify which packet is for which sensor if you want to turn on an LED for that sensor. How is it being parsed for the "form end" is there any indicator that signals which sensor it is from?

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 4 of 8
(3,646 Views)

OOh ok ..Well I am assigning every frame to a sensor based on an ID in the frame itself  and then using a case structure to send the remainig data to the Sensor's indicator on front end form.

Now therese are 16 ids and thus i have 16 sensor outputs on my form and it usully runs sequentially (sensor 1-->2-->3...) . All i need is a small led next to sensor data when its value is being updated.(like it glows when its recieving new values) . 

I understand a bit True False glows when 1 and this logic can be used whenever a particular case of  Id's is true in case structure.  But is there any other way?

 

Thanks a lot guyz ...

 

0 Kudos
Message 5 of 8
(3,639 Views)

Is this related to the VI posted here?

 

Frankly, I am puzzled by the code you posted, because it seems so scattered.

 

Can you be a bit more specific. Is the sensor information encoded in the serial data? If so, how?

0 Kudos
Message 6 of 8
(3,627 Views)

Yes it is , the analog ID is input to the case structure  on extreme right .....The ID decides which case , and each case is a different sensor . So all I need is whichever case gets called should  light up an led next to it on form.

0 Kudos
Message 7 of 8
(3,624 Views)

You really should use arrays instead of all these scalar indicators. The code would be 16x simpler!!!

 

Anyway, here's how you would light up an element of a boolean array based on the "ID". (LabVIEW 2011). Should be easy to incorporate...

Message 8 of 8
(3,615 Views)