LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Readings appearing blinking

Dear All,

i am receiving and displaying readings from 5 sensors and the problem is they are blinking between 0 and the actual value at a rate. also they do not get updated until i stop the program and start again. can you please help figure out where is the problem in the program attached. thanks

0 Kudos
Message 1 of 11
(3,446 Views)

If possible try to share the code in LV2015.

----------------------------------------------------------------------------------------------------------------
Palanivel Thiruvenkadam | பழனிவேல் திருவெங்கடம்
LabVIEW™ Champion |Certified LabVIEW™ Architect |Certified TestStand Developer

Kidlin's Law -If you can write the problem down clearly then the matter is half solved.
-----------------------------------------------------------------------------------------------------------------
0 Kudos
Message 2 of 11
(3,443 Views)

Hi sr,

 

what's the value of "Temperature" while you are running your test?

Maybe you are constantly sending a "*IDN?" request to your device and it answers that request with unexpected (aka nonsense) data?

 

Did you debug your VI? Which string is received when your displays "blink 0"?

Did you implement any error handling in your VI? (The answer is "No!" as you are not handling unexpected messages from your device!)

 

Does your device send data all the time? Then you should not use any Wait function in the receiver loop nor any case structure around the VISARead function as your receive buffer may overrun otherwise!

Best regards,
GerdW


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

Hi sr

The first thing I would try is to put a Diagram Disable Structure around the whole of the lower while loop that sends out the *IDN? query. This doesn't look as if it is required to read back the sensor data. Put a probe on the string response from the VISA read VI and see exactly what you are getting back. It appears that the sensors are just sending out unprompted data so you need to check the format of this data in terms of length and termination characters and check that you are handling it correctly.

Good Luck!

Neil

0 Kudos
Message 4 of 11
(3,405 Views)

@GerdW wrote:

Hi sr,

 

what's the value of "Temperature" while you are running your test?

Maybe you are constantly sending a "*IDN?" request to your device and it answers that request with unexpected (aka nonsense) data?

 

Did you debug your VI? Which string is received when your displays "blink 0"?

Did you implement any error handling in your VI? (The answer is "No!" as you are not handling unexpected messages from your device!)

 

Does your device send data all the time? Then you should not use any Wait function in the receiver loop nor any case structure around the VISARead function as your receive buffer may overrun otherwise!


The remote device sends data all the time. the value of the temperature is around 20 deg. I have removed the case structure and temporarily the write loop as well. Also there is no wait in my read loop. doing so ,I get the readings on the receive block but not on the separated indicators via the spreadsheet to string array function.

Download All
0 Kudos
Message 5 of 11
(3,394 Views)

@NeilR wrote:

Hi sr

The first thing I would try is to put a Diagram Disable Structure around the whole of the lower while loop that sends out the *IDN? query. This doesn't look as if it is required to read back the sensor data. Put a probe on the string response from the VISA read VI and see exactly what you are getting back. It appears that the sensors are just sending out unprompted data so you need to check the format of this data in terms of length and termination characters and check that you are handling it correctly.

Good Luck!

Neil


Thanks for your response Neil; i want to send some text back to the device (arduino device) to turn on its digital output based on the temperature reading. i was firstly trying to send some text and check if it can be sent and read/displayed on the remote device serial monitor. Do you think I should incorporate the write loop which includes comparing the current temperature to a specific set point temperature in the same read loop or should it be in a different while loop ?

0 Kudos
Message 6 of 11
(3,390 Views)

Hi sr,

 

I get the readings on the receive block but not on the separated indicators via the spreadsheet to string array function.

We already had a discussion in this very topic in your other thread!

 

Again I have to ask: what is the string you receive from your device? Does it contain the expected data?

 

Did you do ANY debugging with your VI?

 

And I have to repeat: do some error handling on your received data after parsing to avoid displaying non-existing data in those scalar indicators!

Best regards,
GerdW


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

@GerdW wrote:

Hi sr,

 

I get the readings on the receive block but not on the separated indicators via the spreadsheet to string array function.

We already had a discussion in this very topic in your other thread!

 Yes, and it worked perfectly until I added a write loop to do something based on the temperature reading.

Again I have to ask: what is the string you receive from your device? Does it contain the expected data?

 The string i receive is 849 20.25 916.46 0.00 0.000 which is appropriate as expected on the response block. However, i dont know why are these readings not showing separately now. I tried putting a delay for 100ms, but then it starts to blink between 0 and an actual reading. 

Did you do ANY debugging with your VI?

 On doing the highlight execution, i can see there is nothing sent to the spreadsheet block when there is no delay in the loop and hence nothing comes out. 

 

And I have to repeat: do some error handling on your received data after parsing to avoid displaying non-existing data in those scalar indicators!

can you pls provide an example for this ? thanks


 

0 Kudos
Message 8 of 11
(3,377 Views)

@sr_murd wrote: I get the readings on the receive block but not on the separated indicators via the spreadsheet to string array function.

Are you sure you are just not looking at old data?  Get rid of the Feedback Node and the Concatenate String and have your Response wired directly to the VISA Read.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 9 of 11
(3,370 Views)

@crossrulz wrote:

@sr_murd wrote: I get the readings on the receive block but not on the separated indicators via the spreadsheet to string array function.

Are you sure you are just not looking at old data?  Get rid of the Feedback Node and the Concatenate String and have your Response wired directly to the VISA Read.


sir,

the response is directly fed into the spreadsheet to string. the blinking problem is resolved, the reading is fine now. my question is , for the visa write , should i create the write inside the same while loop or should i create another while loop and then create the write inside that while loop? for the visa write, i have to compare the current temperature with a specific temperature and then send out a text via the serial port.

0 Kudos
Message 10 of 11
(3,357 Views)