Instrument Control (GPIB, Serial, VISA, IVI)

cancel
Showing results for 
Search instead for 
Did you mean: 

Pressure set point instruction does not work on My CVC3000

Hello, I start to work on this device "CVC 3000" for control and data collection. It is in fact a pressure regulator.

 

Ayoubas01_1-1648556636182.jpeg

I made a small program, I managed to display the value of pressure in continuous mode with VISA, but my problem since I read the manual of command interface, I can not control my instrument for a given value of pressure, I launch the set point but it goes down and until below this value, it does not make the regulation therefore.


I don't know if I have mistyped the commands or if there is a problem somewhere


So my question is: how can I use these command instructions with VISA, to be able to control my instrument and enter a pressure set point and what exactly meets the need?
I put you attached screenshots and the program thank you all!

gghhgh

Ayoubas01_7-1648556963083.pngAyoubas01_8-1648556977354.png

 

Ayoubas01_5-1648556917265.pngAyoubas01_6-1648556930756.png

Ayoubas01_9-1648557092980.pngAyoubas01_10-1648557125629.png

 

 

0 Kudos
Message 1 of 4
(729 Views)

Your first problem is the use of the Bytes At Serial property. This is WRONG in almost every case when using VISA and DEFINITELY when trying to communicate with an instrument! Try to watch this video about the do's and don'ts of serial port communication in LabVIEW!

Rolf Kalbermatter
My Blog
0 Kudos
Message 2 of 4
(690 Views)

the problem is not with the use of Bytes serial, the communication is well established.
my problem was in the syntax of the commands rather, I had to put start at the beginning of the instructions of control and a line break for each instruction what was not the case before a concatenated string that does not put you a break if you do not add it yourself.
I still have a problem with the VENT command, it doesn't work, I don't know if I should add other instructions with it or if it depends on the mode (continuos dumping, vac control..)

In short I put in joints my new program to modify hoping that it will be useful one day someone who falls on same problem

Ayoubas01_0-1648733265271.png

Ayoubas01_1-1648733288283.png

 


I also putcommand of  VENT the datasheet to help me thanks to all!

Ayoubas01_2-1648733400014.png

 

 

0 Kudos
Message 3 of 4
(673 Views)

@Ayoubas01 wrote:

the problem is not with the use of Bytes serial, the communication is well established.


No it isn't! Use of "Bytes at Serial Port" is NEVER going to give you reliable instrument communication. That you had other problems in your code with what commands to use, is no counter argument.

 

It just was your first problem that made the use of "Bytes at Serial Port" irrelevant. The way you have programmed it now you wait BEFORE you send the command, and then immediately check how many bytes are in the input buffer to read the reaction. That only works reliably if your instrument is lightning fast and can answer in 0.0 seconds after it receives the command AND the response is not to long so that it does take significant time to transfer over the serial line AND if the Windows device driver does not decide to queue the command message in the serial port buffer before actually sending it out. If any of that is not given, you will read "Bytes at Serial Port" BEFORE the instrument has completely sent its message or possibly even received your command!

 

And placing the delay between Write and the "Bytes at Serial Port" only seemingly fixes the problem. Your device may not always be equally fast because it may just be busy with actually doing what it is supposed to do in the first place, namely measuring, or a new revision of the firmware got slower and then your wait time is suddenly to short. Sure you can go into the program source and increase the wait time then, but that will mean that your communication is getting slower, even if it would not be needed in 99% of the cases, but to cover for that 1% of possibility that the device answers slower, you have to slow down ALL the communication with your device. 

Rolf Kalbermatter
My Blog
0 Kudos
Message 4 of 4
(657 Views)