02-22-2017 02:35 AM - edited 02-22-2017 02:52 AM
Dear all,
I am a novice in LabView programming but I managed to read WRITE and READ using VISA protocol the pressure from my single gauge (TPG261). When I tried to plot my pressure data on a graphic, I received some 0 value in between each pressure value. Please find in attached file the VI, and a screenshot of the front panel interface. I do not understand from where comes these zeros...
I tried to look into this forum without finding clues to help me with this weird event.
If anyone can help me a little bit on this, It would be very much appreciated.
Ps : sorry if this topic is not in the correct section of this forum.
Thank you
Best regards
Solved! Go to Solution.
02-22-2017 02:53 AM
Hi Rémy,
big fail: don't open/init the serial port in each iteration of your loop! Call init just once before the loop!
- The sequence frame isn't needed in your VI!
- when you disable the "system dependent decimal separator" in the numeric conversion function you wouldn't need to exchange all points with commas in your received string… (Even better: set your OS/regional settings to use the point as decimal separator!)
- implement error handling in case you receive garbage data in your string…
02-22-2017 03:07 AM
Dear GerdW,
First of all, thank you for your fast reply.
All your comments make sense and I am confident that it would work nice.I will have a look at it soon and I will get back to you with my feedback.
once again,
Thank you
Best regards
02-22-2017 03:22 AM
Dear GerdW and potential readers,
I tried to take care of your advice but unfortunately I still get the same results. Please find in attached file the new version of the Vi. I may have wrongly interpreted your request ! If you have any though on this new file, it would much appreciated.
Thank you for your kind consideration
Best regards
02-22-2017 03:29 AM - edited 02-22-2017 03:31 AM
Hi Rémy,
you still had no error handling in your VI! General rule: when you don't want to plot the zeros you need to avoid them as early as possible!
I also changed string conversion a little bit (please test this part for reliability!).
How does a typical received string look like?
02-22-2017 03:35 AM - edited 02-22-2017 03:35 AM
Hi GerdW
You are absolutely awesome ! This is exactly what I intended to do...
Thank you very much for your reactivity and expertise.
I wish you an excellent day but be sure that you have made mine !
🙂
Best regards
Rémy
01-31-2019 05:00 PM
Dear Remy,
thank you for your solution - I'll try this out.
Cheers
-e-