07-29-2010 05:34 AM - edited 07-29-2010 05:35 AM
Hello BZajec,
I don't think that the command 'AV1' will work because I think this is a command for the duel channel PR4000. I have the PR4000S (single channel device).
I believe the command structure is different. But the manual I have is very unclear as to what the command structure is!! (Manual is attached).
07-29-2010 05:56 AM
Dear Nevica,
Yes, after looking at your manual it seems that the command structure in your case is completely different from mine pr4000.
However, you said that sending "v" returns the prxxxxx code that seems to be the instrument ID. That is true, since hexadecimal representation of char. "v" is 0x76 and in your manual (page 63.) this is the command for getting and ID.
Commands in your manual are written in the form 0xAB where A and B are numbers. This is hexadecimal notation. See e.g. http://www.asciitable.com/
to convert from hex codes to a character.
Try sending character "!" , this should return also measured value.
regards,
Bojan
07-30-2010 06:10 AM
Hello Bojen,
Yes you are right in saying that the command are in hexadecinal notation.
I tried to send '!' with hyperterminal and this does not return the required pressure reading. I have also tried to send a lot of other commands but non of them seem to work. Only v will return anything useful and intelligible.
I presume that I must have some setting incorrect. I know that The commands are being sent because v works (ie rs232 is set up correctly).
I am stuck at the moment.
Regards,
Nevica
07-30-2010 06:56 AM
Hello Nevica,
When you try other commands (particularly those READ ones), do you get any answer or nothing at all? It would be good if you count the number of bytes coming back as an answer. If you always get 0 bytes than you really do not get any answer.
Your PR4000 should answer you in the same manner as you are sending commands.
e.g. sending "m" for READ limit mode
should give you the ascii character that has hexadecimal 0x30, 0x31, 0x32 or 0x33 where
" Binary, ASCII: 0x30...0x33 Index for limit mode (0...3)The valid limit modes areSLEEP, LIMIT, BAND and LEAK " according to the manual.
However, ascii character 0x30 and 0x31 are not printable, only 0x32 and 0x33 are (that is space and exclamation mark). I have no idea why the PR4000 communication is partially based on non-printable ascii characters.
What you need is to get ascii code of the character you get as an answer.
regards,
Bojan
09-16-2010 05:03 AM
Hello everybody !
It took me some days to figure out how to control the PR4000 single channel (PR4000S).
The commands are written in ASCII but very strangely. For example, you want to send "update all values" to set the setpoint.
In the manual the command is :
0x21 @cmd Setpoint.
You have to send everything in ASCII. 0x21 is "!" but as there are some unprintable characters I will write it (0x21)ASCII.
@cmd is (0x60)ASCII (`) if you want the setpoint off and (0x42)ASCII (B) if you want the setpoint on.
What is impossible to understand from the manual is that the ASCII codes you send for the setpoint are not the ASCII translation of the setpoint. It is a modified value.
You have to change your setpoint value (float=sgl) to ASCII. You have 4 bytes. Then you change these for bytes to binary. The you cut the last two bits. To have 8-bit bytes, you have to send the missing two bits in the header. You fullfill the setpoint bits with a 1 and the parity and you have SETPOINTMODIF (4bytes)
The header is actually made of the missing bits of the following bytes.
header2(b7 b6 b5 b4 b3 b2 b1 b0) SPByte3 SPByte 2 0x0 header1(b7 b6 b5 b4 b3 b2 b1 b0) SPByte1 SPByte 0 0x0
In all the commands, Byte 1 is 0x0 ! So bits 0 and 1 of the header are always 0
bits 2 and 3 of header 1 are the "missing bits" of your setpoint Byte 0
bits 4 and 5 of header 1 are the "missing bits" of your setpoint Byte 1
bits 2 and 3 of header 2 are the "missing bits" of your setpoint Byte 2
bits 4 and 5 of header 2 are the "missing bits" of your setpoint Byte 3
You fullfill the bits 6 and 7 of your header with the parity
Then you send all your string :
(0x21)ASCII (0x60)ASCII (head2)ASCII (SPMODIFB3)ASCII (SPMODIFB2)ASCII (0x0)ASCII (head1)ASCII (SPMODIFB1)ASCII (SPMODIFB0)ASCII (0x0)ASCII (Carriage return)ASCII
The guy who invented that should be totally crazy...
As a reward, a VI (LV7.1) to set the setpoint and read the actual value (on COM1)
01-02-2011 06:01 PM
Dear Bojan:
Please send me a copy of the LabView program for MKS PR4000.
Best regards,
Sam Jo
01-04-2011 04:24 PM
Hello Sam,
Are you having trouble communicating with your device through LabVIEW? Are you using the instrument driver for the device?
Best Regards,
Adam G
12-16-2011 08:22 AM
Hi!
I found one in the German LabVIEWforum
I haven't tested it yet, but seems it was written by someone at MKS Germany
-Franz
05-28-2015 08:27 AM
Hello
How do I control flow through MKS Mass Flow Controller PR4000 using Labview?
Im new to LabVIEW please let me know bout it in detail.
Thanks for all the help
hsupopmichael@gmail.com
05-29-2015 09:22 AM
Hello ChienYueh,
Follow this link and you should be able to navigate to the driver download for this instrument.
http://sine.ni.com/apps/utf8/niid_web_display.model_page?p_model_id=3975
Once you have the driver downloaded and installed, you will have new functions for use in LabVIEW which you should be able to find under the Measurement I/O palette. Usually these functions include Initialize, Configure, Read/Write, etc options for your specific device. Many times the drivers will provide examples to accompany them which show how to use basic functionality with the device in LabVIEW. You can navigate to these examples by going to Help»Find Examples»Hardware Input and Output»Instrument Drivers»LabVIEW Plug and Play» then select the appropriate example. Have a good day.
Paul C