LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Rs232 communication with pfeiffer vacuum single gauge

Solved!
Go to solution

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

0 Kudos
Message 1 of 7
(6,570 Views)

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…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 2 of 7
(6,551 Views)

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

 

0 Kudos
Message 3 of 7
(6,546 Views)

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

0 Kudos
Message 4 of 7
(6,537 Views)
Solution
Accepted by topic author RémyMaury

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?

 

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
Message 5 of 7
(6,530 Views)

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

0 Kudos
Message 6 of 7
(6,522 Views)

Dear Remy,

 

  thank you for your solution - I'll try this out.

Cheers

    -e-

 

0 Kudos
Message 7 of 7
(5,200 Views)