LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

A driver for MKS PR-4000 via serial port

I'm trying to connect a MKS PR-4000 to a computer, using the serial RS-232 port. Is there a driver that is configured to do this? If not, what should I know before attempting to write my own?
0 Kudos
Message 1 of 27
(5,195 Views)
There is no driver for that instrument available from the Instrument Driver Network so if no one posts that they have developed one, you might want to check with MKS to see if they have one. To develop your one driver, you first need the programming manual for the instrument. You should also check the links at the above site under the Develop topic. Instead of a full driver, you can also use the Instrument I/O Assistant. LabVIEW 8 has made great improvements in the assistant so if you have that version, try it. The shipping driver for the HP34401 has support for both serial and GPIB models so you might want to look at that as an example in how to setup for serial communication. Lastly, I would recomend that you do your initial debug with either Hyperterminal or MAX in order to get the basic communication going with the instrument. If you can communicate with either, then you know that your cable and com parameters (baud rate, parity, etc.) are correct before you start debugging any LabVIEW code.
0 Kudos
Message 2 of 27
(5,184 Views)
Thanks for the response.  I've looked around on the internet for the driver, but it looks like it doesn't exist.  So, I've been trying to write my own.  I have looked at the HP34401 driver, and I've been trying to connect to the PR4000 (the ultimate goal), with no success.

I've been using the instrument I/O assistant, and the serial connection examples provided with LabVIEW (version 7 in my case), but with no success: the computer sends the commands (which I've tried from two separate manuals that give a different set of commands for what appears to be the same device) and the device doesn't respond at all. 

Perhaps I'm missing something big here.  Is there any source of help on the net that I can use to learn how to do this sort of thing?  Unfortunately, I don't have the time or means to do any extended course on this.

Thanks again for the help.
0 Kudos
Message 3 of 27
(5,157 Views)

Did you try communicating with Hyperterminal? Like I said, that should be the first step before trying to write your own program. If you can't get it to talk with Hyperterminal, verify the com settings (baud rate, parity, etc.) and the serial cable itself. Typically, you use a null modem cable where the Tx and Rx lines are crossed.

I don't know what to say about two different command sets for the same instrument. The manufacturer should be the one that answers this question and should have some getting started help. They probably won't know anything about LabVIEW but if they shoould be familiar with Hyperterminal or some other terminal emulator program such as Procomm.

0 Kudos
Message 4 of 27
(5,151 Views)
I've tried with hyperterminal, but I still can't get anything out of it.  Perhaps I'm not doing it right?  I set up a connection with the COM1 port, matched the settings, and then typed in some of the instructions, but got no replies. 

I've tried both manuals instruction sets, to no avail.  I also checked the serial crossover cable, it appears to be sound (I just checked with a multimeter). 

I still haven't gotten a response from MKS.  Perhaps they will have some answers.
0 Kudos
Message 5 of 27
(5,145 Views)
Back again, now I've gotten a connection with the instrument with HyperTerminal.  How can I set up LabVIEW to send the same messages that I'm sending with HyperTerminal?  I'm using the I/O assistant, but it doesn't seem to send commands that the instrument likes, even though they are going the same place at the same rate and such.  Is there a more direct way to send messages out the COM1 port?  Or alternatively, how can I set up the I/O assistant to have the same baud rate, parity, etc. that the HyperTerminal does?

Since I got a connection, I also know which instructions work now!

Thanks again for your help.
0 Kudos
Message 6 of 27
(5,140 Views)

Okay, you've made some great strides in getting things to work. The I/O Assistant should, in most cases, work. First, when using the assistant, you have to use MAX (Measurement & Automation Explorer) to configure the serial port. Open MAX, expand Devices & Interfaces, select your com port and configure it. Second, when you use the assistant to write a command, you'll see a termination character box. By default, this is a \n. This is the control code for a Line Feed. Some instruments require this, some require a Carriage Return (\r), and some require both. Hyperterminal sends a CR\LF so you can try entering \r\n. The instrument manual should tell you what the instrument expects. Third, the assistant is set to transmit text. If you are using Hyperterminal to send a command like "read", you should be okay. If you are using Hyperterminal to send a series of hex characters, then the assistant can't be used. Lastly, make sure you're not trying to use the assistant at the same time you have Hyperterminal open. Windows doesn't allow this.

If you don't want to use the I/O Assistant, then look at the shipping examples for serial communication. The examples and the assistant both use VISA but the examples give you the ability to do more customization.

0 Kudos
Message 7 of 27
(5,134 Views)
Should the Instrument I/O assistant give me output?  It seems like it should but it doesn't give me anything.  I've now set it up (thanks for the help with MAX, that was necessary), and it will write, read and parse, but it won't give me links to the outputs.  This seems like it should be super easy, but I can't see how it is done.
0 Kudos
Message 8 of 27
(5,125 Views)
The assistant will return data if you tell it to. did you select Auto parse? When you do, it should create a token (which you can rename) along with a data type. This is the return value. You can have one for each query and parse.
0 Kudos
Message 9 of 27
(5,121 Views)
I did select auto parse, and it said that it had two outputs (giving the exact numbers from the instrument that I've been questing for all this time), as I wanted, but then I closed the configuration window, and the object in the block diagram had no inputs or outputs, and couldn't be converted to a VI that has anything in the block diagram. It seems like something is broken. Any ideas what is wrong? Could I be missing some software?
0 Kudos
Message 10 of 27
(5,106 Views)