LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A driver for MKS PR-4000 via serial port

Today a much more experienced LabVIEW user came and showed me how to create a VI, from scratch, to do what we want to do. I think we concluded that the components were not all installed correctly, but by using the lower level functions and my experience with the device we were able to write the code we wanted.

Thanks again for all the help. I really appreciate it, this has been a real learning experience for me.

Karl
0 Kudos
Message 21 of 27
(3,254 Views)
Hello
I've got a MKS PR 4000 and I have to communicate with via serial port (RS232 cable). When I connect the device to my PC nothing happened with Labview, or hyperterminal.
I've read your mail on the Labview forum and I saw that you have a connection with the instrument!
So I need to know how did you get a communication with the PR4000.
What kind of commands do you send to it? Can you give me an exemple?

Thank you very much to answer me as soon as possible.
0 Kudos
Message 22 of 27
(3,234 Views)
Hi,
Hyperterminal is the best way to get a connection with the device.  Set the baud rate to 9600, parity to odd, and the flow control to XON/XOFF, with 7 data bits and 1 stop bit.  Connect the instrument with a null modem cable (crossover cable, the important connections are pins 2 to 3, 3 to 2, and 5 to 5, I think).  Then, a few commands that are useful are:
 
RT,ON sets the instrument in remote mode (RT,OFF does the opposite, ?RT asks, and should return either "ON" or "OFF")
 
?AV1 gets the value of the first channel
 
You should be able to find a manual for the device somewhere (internet) that has these commands and more.  The big challenge is to get the connection started, then you can copy the same settings to your LabVIEW program.
 
Hope this helps,
Karl
0 Kudos
Message 23 of 27
(3,231 Views)
Hi
Thank you for your answer.
I've set all the connection parameters (baud rate, parity,...) as you said, and my cable is good. I've got the instruction manual from mks instruments.
But the instrument still doesn't answer.That's why I do have other questions:

Do you first send to it an "initiating command", or do you begin directly with "?AV1" (to read the pressure for example)
Do you use the Change format command ("%1") ?
In the instruction manual (-> 'general commands'), I doesn't see ascii commands like "RT?" or "?AV1" (I doesn't see the character "?" as an ascii command). Can you explain me?

Thank you again.


0 Kudos
Message 24 of 27
(3,222 Views)
I have no problems communicating with the instrument. Take into account that you must use the Enter button close to the left part of the keyboard. the one close to the letters is different and it is not only carriage return!
 
My problem is that I am not able to switch on the operation, but I have to press the "ON" button on the front panel. Any idea?
0 Kudos
Message 25 of 27
(3,117 Views)

Hi Karl,

 

I have read your posts regarding the PR4000.

 

I am trying to communicate with a PR4000 single channel device via Labview vis which I found on a German website.

 

You mentioned that a colleague was able to help you with this and you succeded in developing a program for it.

 

I wonder if you will make this program available publicly but if not could you please give me a start with the codes which you have used to get measurements from the PR4000. (I have found the PR4000 manual very confusing).

 

I pressume that you are using Express I/O vi to achieve this.

 

I look forward to hearing from you,

 

Regards,

 

Nevica

0 Kudos
Message 26 of 27
(2,680 Views)

Hello Nevica,

It has been a long time since I looked at this problem, and I've since moved on to other labs, leaving the program and the device behind, so I no longer have it myself.

 

The techniques that I found most useful were to use the most basic techniques to send messages to the device, for example through the NI MAX application you can send individual commands.  I don't recall if it responded to a *IDN? query, but that's always something to try.  You may be able to contact MKS and get the full list of commands that you can send via RS-232, and develop your own driver through NI VISA.  First make sure you can get a response out of the device, then write a short program to query it, or adapt the vi's you've found to connect to it.

 

I hope this helps.  Good luck!

Kar

0 Kudos
Message 27 of 27
(2,642 Views)