LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Anyone have experience using an MKS PAC100 with a serial module

I have an MKS PAC100 with a serial module and a mass flow controller module attached. MKS provides a driver for the MFC module which uses Modbus to communicate with the PAC100 over an ethernet cable using an IP address. The serial module gets more complicated. MKS provided a boot program that is loaded onto the PAC100, and I used telnet to set the serial port settings. Now I should be able to use Modbus to communicate with instruments connected to the serial module but I'm not sure where to start and was wondering if anyone had done this before? I'd like to be able to read data from a Lakeshore 218 connected to the serial slice. I'm familiar with LV but have never used Modbus.

 

To clarify the setup, my PC (LV 2019) is connected to the PAC100 with an ethernet cable, the PAC then has a MFM module which simply attaches to the side, and then an serial communications module which is attached to the side of the MFM module.

 

Thanks in advance for any help!

0 Kudos
Message 1 of 8
(3,737 Views)

My thought would be that the MB Serial Master Query.vi might be a good place to start, but in the VISA resource name selection I don't have any options beside LPT1. I couldn't figure out how to add the PAC100 as a target in a LV project. I didn't see it listed as an option, even when using the PAC's IP address. 

0 Kudos
Message 2 of 8
(3,682 Views)

I would look at the NI MB library available via the JKI Package Manager. I have used it for Ethernet based communications and it is pretty straightforward provided you know the registers for the device you are communicating with. It supports serial MB as well and the only difference in your code should be the initialization.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 3 of 8
(3,678 Views)

So I have downloaded the MB library and looked through what it contains, it looks to be very helpful, but there is something that I don't fully understand. If I'm trying to communicate using RS-232 through an RS-232 module connected to an MKS PAC100, I'm assuming I should be using the MB Serial VI's, but these use VISA Write to Write a Modbus Data Unit to the selected VISA Resource Name. How is the instrument supposed to interpret a Modbus Data Unit? It should be getting a serial command. I don't really understand how this is supposed to work?

0 Kudos
Message 4 of 8
(3,635 Views)

Modbus serial does have it's own protocol, even over serial. So when you send your data the Modbus libary is adding the protocol elements to your data. Both the sending and receiving device have to be using the same protocol in order to understand each other. At its most basic, the VISA resource name will simply be the specification of which phyiscal com port is being used.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 5 of 8
(3,629 Views)

Hello Nadwe,

 

I doubt that you will have direct access to a serial port on your MKS PAC100. Judging from the description on their homepage it comparable to a PLC - i.e. you can write and run programms on this device (although not LabVIEW programs).

 

I would assume that you need to write a programm for that PAC which will then communicate with Modbus devices over the serial expansion slot. Perhaps you can transfer this results to the TCP-Modbus slave registers on that PAC - and thus read data with the LabVIEW modbus libraries.

 

There are some PDF about Modbus & MKS and LabVIEW and MKS on their webpage , although I cannot tell you how helpful these are, since they ask for a registration before reading these.

 

Regards, Jens

Kudos are welcome...
Message 6 of 8
(3,617 Views)

Hi Jens,

 

Yes, I believe you are correct about this. MKS provided me with a boot program to load onto the PAC, which I have done. My understanding is that this program is the in between between the serial expansion and LabVIEW. But this program isn't specific to an instrument. So I still don't fully understand how the instrument is supposed to get an appropriate command to respond to. For example, one of the instruments I'd like to communicate with is a Lakeshore 218 temperature monitor. When I use a cRIO and a 9870 for serial communication I send the 218 a command KRDG?\n to read all of its temperature channels. With modbus and the PAC100, how is this command supposed to be sent? Should that be a command the PLC code sends, and then the LV modbus VI reads the response the PLC code gets?

0 Kudos
Message 7 of 8
(3,610 Views)

Hello Nadweb,

I really don't know - I never worked with this HW, I am just guessing from the description on the manufacturers webside. Google found a manual from another webside stating that MKS also provides LabVIEW-VIs, but I cannot tell you what you are able to do with those...

 

Quote from that manual:

"Virtual Instruments(VI) for the PAC 100 and I/O modules are available. Please contact your local MKS Sales representative or MKS Automation and Control Solutions Applications Engineers for the VIs."

 

My further advices are: Read the manuals and descriptions of your hardware, it really should describe how to work it...

 

Regards, Jens

Kudos are welcome...
0 Kudos
Message 8 of 8
(3,592 Views)