10-22-2013 08:56 PM
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
10-22-2013 09:47 PM
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.
10-22-2013 09:53 PM
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??
10-22-2013 10:16 PM
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?

10-22-2013 10:39 PM
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 ...
10-22-2013 11:10 PM
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?
10-22-2013 11:14 PM
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.
10-23-2013 12:02 AM - edited 10-23-2013 12:02 AM
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...