RMUman

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 29

RMU

Version 1.1

User Manual

MKS Instruments, Inc.


Control & Information Technology Products Group
3350 Scott Blvd Bldg 4
Santa Clara CA 95054

Main: 408.235.7620 Revision 02


12/04
Fax: 408.235.7625
RMU User Manual Version 1.1.6

Copyright
This manual and the software described in it are copyrighted with all rights
reserved. Under the copyright laws, this manual and software may not be copied,
in whole or part, without the prior written consent of MKS Instruments. The same
proprietary and copyright notices must be affixed to any permitted copies as were
affixed to the original. This exception does not allow copies to be made for others
whether or not sold, but all of the materials purchased may be sold, given, or
loaned to another person. Under the law, copying includes translating into another
language or format.

© MKS Instruments - CIT Products Group, 2003


3350 Scott Blvd Bldg 4
Santa Clara, CA 95054

Preface

About this manual

This manual is designed to serve as a guideline for the installation, set up,
operation and basic maintenance of the RMU Remote Monitoring Unit. The
information contained within this manual, including product specifications, is
subject to change without notice. Please observe all safety precautions and use
appropriate procedures when handling the RMU product and its related software.
This manual covers all versions V1.1.X. The latest version at time of revision is
noted in the page header.

2 of 2
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

Table of Contents
1 GENERAL INFORMATION ..................................................................................................................................4
1.1 CONVENTIONS USED IN THIS USER MANUAL ..................................................................................................................... 4
2 INSTALLATION AND SETUP..............................................................................................................................5
2.1 SHIPPING BOX CONTENTS .................................................................................................................................................. 5
2.2 RMU INTERFACE DESCRIPTION ......................................................................................................................................... 5
2.3 INSTALLATION ................................................................................................................................................................... 6
2.4 WIRING AND HARDWARE CONFIGURATION ....................................................................................................................... 7
2.4.1 Power Supply Wiring................................................................................................................................................ 7
2.4.2 I/O Wiring ................................................................................................................................................................ 8
2.4.3 Digital Input Interface Example............................................................................................................................. 11
2.4.4 Analog Input Interface Example............................................................................................................................. 11
2.5 COM PORT CONFIGURATION ............................................................................................................................................ 12
2.6 ETHERNET CONNECTOR ................................................................................................................................................... 13
2.7 STATUS LED’S ................................................................................................................................................................ 13
2.8 RESET SWITCH ................................................................................................................................................................. 13
3 NETWORK CONFIGURATION ..........................................................................................................................14
3.1 CONNECT TO THE RMU VIA A SERIAL TERMINAL SESSION ............................................................................................. 14
4 RMU EMBEDDED LINUX OS ............................................................................................................................16
4.1 FLASH MEMORY CONTENTS ............................................................................................................................................ 16
4.1.1 Boot Loader............................................................................................................................................................ 16
4.1.2 The Initrd File System ............................................................................................................................................ 16
4.1.3 Kernel..................................................................................................................................................................... 16
4.1.4 Linux Console......................................................................................................................................................... 17
4.1.5 Embedded Web Server............................................................................................................................................ 17
4.2 DEVELOPMENT TOOLS:.................................................................................................................................................... 18
4.3 EXAMPLE APPLICATION: “HELLO WORLD” .................................................................................................................... 18
4.4 EXAMPLE APPLICATION: ANALOG AND DIGITAL I/O ...................................................................................................... 19
4.5 EXAMPLE APPLICATION: SERIAL COM PORTS................................................................................................................ 22
APPENDIX A - RMU SPECIFICATIONS ...................................................................................................................27

APPENDIX B - MODEL CODE DESCRIPTION.........................................................................................................28

WARRANTY ...............................................................................................................................................................29

3 of 3
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

1 General Information
The RMU is a compact, embedded Linux PC with integrated industrial I/O. The unit can be purchased
with OS only for User integration of logic and 3rd party programs, or with MKS SenseLink™ data
collection and monitoring software.. Different hardware platforms exist, which cover the most common
range of inputs:
• Analog Inputs
• Digital I/O
• RS-232/RS-485
• Ethernet

For a complete list of models at the time of this printing, see Appendix A.

1.1 Conventions used in this User Manual

Warning The WARNING sign denotes a hazard to personnel. It calls attention to a


procedure, practice, condition, or the like, which, if not correctly
performed or adhered to, could result in injury to personnel.

Caution The CAUTION sign higlights information that is important to the safe
operation of the BlueBox, or to the integrity of your files. .

Note THE NOTE SIGN DENOTES IMPORTANT INFORMATION. IT CALLS


ATTENTION TO A PROCEDURE, PRACTICE, CONDITION, OR THE LIKE,
WHICH IS ESSENTIAL TO HIGHLIGHT.

On screen buttons or menu items appear in bold and cursive.


Example: Click OK to save the settings.

Keyboard keys appear in brackets.


Example: [ENTER] and [CTRL]

Pages with additional information about a specific topic are cross-referenced within the text.
Example: (See page xxx)

4 of 4
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

2 Installation and Setup


2.1 Shipping Box Contents
• RMU Product
• Power supply removable terminal block
• I/O removable terminal block (on units with I/O)

2.2 RMU Interface Description

COM2 & COM3 Serial Port

I/O Status LEDs

10BaseT Ethernet Port

COM Port Configuration Switches

Reset Switch

Power LEDs

Power Terminal Block

COM1 Serial Port

I/O Terminal Block II


(Double Slot Units only)

I/O Terminal Block I

5 of 5
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

2.3 Installation
The RMU mounts on a standard 35mm DIN rail. Make sure there is sufficient top and bottom clearance
for ventilation, to maintain an ambient operating temperature of 0°C to 50°C.

0
75 10

All dimensions in millimeters.

To install, slide the Top Clip over the DIN rail, and gently press down on the RMU until the Bottom Clip
snaps into place.
To remove, use a flat-blade screwdriver to gently pry the Quick Release Tab until the Bottom Clip
disengages from the DIN rail.

Top Clip

35mm DIN Rail

Bottom Clip

Quick Release Tab


(pry in direction of arrow)

6 of 6
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

2.4 Wiring and Hardware Configuration


The RMU uses removable terminal blocks with quick-connect wire termination. Each terminal accepts up
to one #26 (14 AWG) wire. Insulation stripping length is 10 mm. Each terminal block also has a screw
attachment feature to secure it to the unit.

To install a wire, use a small (2 mm) flat-blade screwdriver to depress the Wire Tension Clip. Insert the
stripped wire end into the Wire Termination Hole and remove screwdriver to engage the Wire Tension
Clip.

To remove a wire, use a screwdriver to depress the Wire Tension Clip and gently pull on the wire

(Weidmuller p/n 1691120000)

Wire Termination Hole

Wire Tension Clip

Terminal Block Mounting Screws

2.4.1 Power Supply Wiring


Connect an external 9-30VDC power supply to the 3-terminal Power Terminal Block

(Weidmuller p/n 1748280000)

Power Terminal Block

PIN TERMINAL SIGNAL


1 + +VDC
2 Earth Chassis Ground
3 - VDC Common

7 of 7
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

2.4.2 I/O Wiring


The RMU has a 28-pin I/O Terminal Block. Each I/O configuration has unique pin assignments, which
are shown in the following tables. The incoming power from the Power Terminal Block is available as a
reference voltage on the I/O Terminal Block.

Model: 4AI-DIF, 4DI / 4AI-Current, 4DI

PIN LABEL DESCRIPTION PIN LABEL DESCRIPTION


28 O4 Digital Output 4 (relay contact N.O.) 27 04C Digital Output 4 (relay common)
26 O3 Digital Output 3 (relay contact N.O.) 25 O3C Digital Output 3 (relay common)
24 O2 Digital Output 2 (relay contact N.O.) 23 O2C Digital Output 2 (relay common)
22 O1 Digital Output 1 (relay contact N.O.) 21 O1C Digital Output 1 (relay common)
20 I4(-) +24VDC common 19 I4(+) Digital Input 4 (sinking, active low)
18 I3(-) +24VDC common 17 I3(+) Digital Input 3 (sinking, active low)
16 I2(-) +24VDC common 15 I2(+) Digital Input 2 (sinking, active low)
14 I1(-) +24VDC common 13 I1(+) Digital Input 1 (sinking, active low)
12 COM +24VDC common 11 24V +24VDC
10 COM +24VDC common 9 24V +24VDC
8 AI4(-) Analog Input 4 (negative input) 7 AI4(+) Analog Input 4 (positive input)
6 AI3(-) Analog Input 3 (negative input) 5 AI3(+) Analog Input 3 (positive input)
4 AI2(-) Analog Input 2 (negative input) 3 AI2(+) Analog Input 2 (positive input)
2 AI1(-) Analog Input 1 (negative input) 1 AI1(+) Analog Input 1 (positive input)

Model: 8AI-SE, 4DI

PIN LABEL DESCRIPTION PIN LABEL DESCRIPTION


28 O4 Digital Output 4 (relay contact N.O.) 27 04C Digital Output 4 (relay common)
26 O3 Digital Output 3 (relay contact N.O.) 25 O3C Digital Output 3 (relay common)
24 O2 Digital Output 2 (relay contact N.O.) 23 O2C Digital Output 2 (relay common)
22 O1 Digital Output 1 (relay contact N.O.) 21 O1C Digital Output 1 (relay common)
20 I4(-) +24VDC common 19 I4(+) Digital Input 4 (sinking, active low)
18 I3(-) +24VDC common 17 I3(+) Digital Input 3 (sinking, active low)
16 I2(-) +24VDC common 15 I2(+) Digital Input 2 (sinking, active low)
14 I1(-) +24VDC common 13 I1(+) Digital Input 1 (sinking, active low)
12 COM +24VDC common 11 24V +24VDC
10 ACOM Analog common 9 24V +24VDC
8 AI8 Analog Input 8 7 AI4 Analog Input 4
6 AI7 Analog Input 7 5 AI3 Analog Input 3
4 AI6 Analog Input 6 3 AI2 Analog Input 2
2 AI5 Analog Input 5 1 AI1 Analog Input 1

8 of 8
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

Model: 16AI-SE, 8DI

I/O Terminal Block I

PIN LABEL DESCRIPTION PIN LABEL DESCRIPTION


28 O4 Digital Output 4 (relay contact N.O.) 27 04C Digital Output 4 (relay common)
26 O3 Digital Output 3 (relay contact N.O.) 25 O3C Digital Output 3 (relay common)
24 O2 Digital Output 2 (relay contact N.O.) 23 O2C Digital Output 2 (relay common)
22 O1 Digital Output 1 (relay contact N.O.) 21 O1C Digital Output 1 (relay common)
20 I4(-) +24VDC common 19 I4(+) Digital Input 4 (sinking, active low)
18 I3(-) +24VDC common 17 I3(+) Digital Input 3 (sinking, active low)
16 I2(-) +24VDC common 15 I2(+) Digital Input 2 (sinking, active low)
14 I1(-) +24VDC common 13 I1(+) Digital Input 1 (sinking, active low)
12 COM +24VDC common 11 24V +24VDC
10 ACOM Analog common 9 24V +24VDC
8 AI8 Analog Input 8 7 AI4 Analog Input 4
6 AI7 Analog Input 7 5 AI3 Analog Input 3
4 AI6 Analog Input 6 3 AI2 Analog Input 2
2 AI5 Analog Input 5 1 AI1 Analog Input 1

I/O Terminal Block II

PIN LABEL DESCRIPTION PIN LABEL DESCRIPTION


28 O8 Digital Output 8 (relay contact N.O.) 27 08C Digital Output 8 (relay common)
26 O7 Digital Output 6 (relay contact N.O.) 25 O7C Digital Output 7 (relay common)
24 O6 Digital Output 6 (relay contact N.O.) 23 O6C Digital Output 6 (relay common)
22 O5 Digital Output 5 (relay contact N.O.) 21 O5C Digital Output 5 (relay common)
20 I8(-) +24VDC common 19 I8(+) Digital Input 8 (sinking, active low)
18 I6(-) +24VDC common 17 I7(+) Digital Input 7 (sinking, active low)
16 I6(-) +24VDC common 15 I6(+) Digital Input 6 (sinking, active low)
14 I5(-) +24VDC common 13 I5(+) Digital Input 5 (sinking, active low)
12 COM +24VDC common 11 24V +24VDC
10 ACOM Analog common 9 24V +24VDC
8 AI16 Analog Input 16 7 AI12 Analog Input 12
6 AI15 Analog Input 15 5 AI11 Analog Input 11
4 AI14 Analog Input 14 3 AI10 Analog Input 10
2 AI13 Analog Input 13 1 AI9 Analog Input 9

9 of 9
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

Model: 8AI-DIF, 8DI / 8AI-Current, 8DI

I/O Terminal Block I

PIN LABEL DESCRIPTION PIN LABEL DESCRIPTION


28 O4 Digital Output 4 (relay contact N.O.) 27 04C Digital Output 4 (relay common)
26 O3 Digital Output 3 (relay contact N.O.) 25 O3C Digital Output 3 (relay common)
24 O2 Digital Output 2 (relay contact N.O.) 23 O2C Digital Output 2 (relay common)
22 O1 Digital Output 1 (relay contact N.O.) 21 O1C Digital Output 1 (relay common)
20 I4(-) +24VDC common 19 I4(+) Digital Input 4 (sinking, active low)
18 I3(-) +24VDC common 17 I3(+) Digital Input 3 (sinking, active low)
16 I2(-) +24VDC common 15 I2(+) Digital Input 2 (sinking, active low)
14 I1(-) +24VDC common 13 I1(+) Digital Input 1 (sinking, active low)
12 COM +24VDC common 11 24V +24VDC
10 COM +24VDC common 9 24V +24VDC
8 AI4(-) Analog Input 4 (negative input) 7 AI4(+) Analog Input 4 (positive input)
6 AI3(-) Analog Input 3 (negative input) 5 AI3(+) Analog Input 3 (positive input)
4 AI2(-) Analog Input 2 (negative input) 3 AI2(+) Analog Input 2 (positive input)
2 AI1(-) Analog Input 1 (negative input) 1 AI1(+) Analog Input 1 (positive input)

I/O Terminal Block II

PIN LABEL DESCRIPTION PIN LABEL DESCRIPTION


28 O8 Digital Output 8 (relay contact N.O.) 27 08C Digital Output 8 (relay common)
26 O7 Digital Output 7 (relay contact N.O.) 25 O7C Digital Output 7 (relay common)
24 O6 Digital Output 6 (relay contact N.O.) 23 O6C Digital Output 6 (relay common)
22 O5 Digital Output 5 (relay contact N.O.) 21 O5C Digital Output 5 (relay common)
20 I8(-) +24VDC common 19 I8(+) Digital Input 8 (sinking, active low)
18 I7(-) +24VDC common 17 I7(+) Digital Input 7 (sinking, active low)
16 I6(-) +24VDC common 15 I6(+) Digital Input 6 (sinking, active low)
14 I5(-) +24VDC common 13 I5(+) Digital Input 5 (sinking, active low)
12 COM +24VDC common 11 24V +24VDC
10 COM +24VDC common 9 24V +24VDC
8 AI8(-) Analog Input 8 (negative input) 7 AI8(+) Analog Input 8 (positive input)
6 AI7(-) Analog Input 7 (negative input) 5 AI7(+) Analog Input 7 (positive input)
4 AI6(-) Analog Input 6 (negative input) 3 AI6(+) Analog Input 6 (positive input)
2 AI5(-) Analog Input 5 (negative input) 1 AI5(+) Analog Input 5 (positive input)

10 of 10
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

2.4.3 Digital Input Interface Example


The RMU has four 24VDC sinking inputs. Each input is activated upon a contact closure to DC COM, or
a DC COM reference. Each input can also drive a 2-wire proximity switch or similar sensor that is
powered by leakage current. Connect the input as shown below.

OPTOCOUPLER
INPUT 24V

24V

≈ I1+

SWITCH
OR
SENSOR

I1-

COM
The 24V and DC COM are
connected internally to the RMU
power connection.
COM

2.4.4 Analog Input Interface Example


The RMU has four 0 -10V analog inputs, 12-bit resolution. Each is factory configured for either a
differential input or a single ended input. Units can also be ordered in 0-20mA current mode for each
analog input.

AI1+

0-20mA ANALOG
JUMPER SIGNAL

500Ω ~
For single-ended inputs, only one
AI1- connection per AI is required.
Connect the bottom signal to ACOM
as an analog reference.

11 of 11
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

2.5 Com Port Configuration


Set the COM Port Configuration Switches to the desired COM Port settings. COM Port 1 is RS232 only.
COM Ports 2 & 3 are switch selectable for RS232 or RS485. You must power-cycle or reset the RMU
after changing a switch setting.

COM Port Configuration Switches

COM PORT SWITCH POSITION A POSITION B


1 1 RS232 DISABLED
2 2 RS232 RS485
3 3 RS232 RS485

COM Serial Port Connector Pin-Out (DB9 Male Connectors)

COM 1 COM 2 COM 3


PIN SW1=A SW1=B SW2=A SW2=B SW3=A SW3=B
RS232 RS232 RS485 RS232 RS485
1 CD -- -- -- -- --
2 RXD -- RXD -- RXD --
3 TXD -- TXD -- TXD --
4 -- -- -- -- -- --
5 SGND -- SGND SGND SGND SGND
6 -- -- -- RX485(+) -- RX485(+)
7 RTS -- -- RX485(-) -- RX485(-)
8 CTS -- -- TX485(+) -- TX485(+)
9 -- -- -- TX485(-) -- TX485(-)

COM Port 1 RTS and CTS signals are always enabled. If RS232 handshake signals are not required,
you must still connect RTS to CTS together at COM Port 1.

When configured for RS485, COM Ports 2 and 3 can operate in either a 2-wire mode (half-duplex) or 4-
wire mode (full-duplex). For 2-wire operation, you must externally connect RX485 (+) and TX485 (+)
together, and externally connect RX485 (-) and TX485 (-) together. The RMU internally disables the
TX485 transmitter between transmissions, allowing other RS485 devices access to the 2-wire network.

12 of 12
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

2.6 Ethernet Connector


The 10BaseT Ethernet Port uses a standard shielded RJ45 connector. This is a 10Mbps Ethernet port.

2.7 Status LED’s


The two green Power LEDs are lit when the internal 3.3V and 5V power supply voltages are operating
within their normal tolerances.

The RMU has eight additional green status LEDs. The four DIN LEDs (I4, I3, I2, I1) indicate the ON/OFF
state of the four digital inputs. The four DOUT LEDs (O4, O3, O2, O1) indicate the ON/OFF state of the
four digital outputs. The LED is lit when the corresponding input or output is ON.

2.8 Reset Switch


The RMUTM has a momentary push-button reset switch. Press this switch to perform a hardware reset.
The switch is recessed to avoid accidental resets. Use a small screwdriver or paper clip to gently
depress the switch.

13 of 13
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

3 Network Configuration
The RMU network settings configure the 10BaseT Ethernet port.
The following are factory-default Ethernet settings. Customer specific units can be set with other,
unique IP Address Settings.

RMU
Parameter Setting
IP-Address 192.168.1.2
Subnet AMsk 255.255.255.0
Default Gateway none

Telnet to the unit with the following login “root:root”.

In order to read or change the network settings of an unknown unit, you can connect to the RMU via a
serial terminal session (see section below).

3.1 Connect to the RMU via a Serial Terminal Session


Connect your laptop or pc to COM2 of the RMU using a standard null-modem cable.

Using a terminal program such as Microsoft® HyperTerminal or Tera Term Pro you can now connect to
the console port of the RMU.

Connection parameters are as follows:

Parameter Value
Baudrate 9600
Data bits 8
Parity None
Stop bits 1
Flow Control None

• Once the null modem cable (serial) is connected to com 2 then power up the sense link to
establish the connection.
• After boot up, you must press <Ctrl + C> in order to get the # prompt
• Once connected the IP-Address can be changed by using the net command:

14 of 14
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

15 of 15
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

4 RMU Embedded Linux OS


The RMU contains sixteen megabytes of FLASH memory. The first six megabytes contain:
1. Boot Loader (UBoot)
2. Initrd File System and data files image (compressed)
3. Linux Kernel (version 2.4.24) (compressed)

The next ten megabytes contain the Journaling Flash File System (JFFS2) that is used to store
application programs and data.

4.1 Flash Memory Contents

4.1.1 Boot Loader


The major functions of the boot loader are:
1. Interact with the console (RMU COM2) to start the boot process
2. Uncompress and copy the Linux Kernel to the DRAM
3. Uncompress and copy the Initrd File system to the DRAM to be used as the root file system (“/”).
The Initrd File system will be stored in DRAM as a ram disk files system /dev/ram0.
4. Start the Kernel.

4.1.2 The Initrd File System


Initrd is a ram based file system that consists of the following folders:
bin dev etc ftp home
lib lost+found mnt opt proc
sbin tmp usr var

The mnt is located in Flash memory. All others are mounted to the RMA disk, thus any changes or
additions to the file system will be lost when the system is rebooted.

4.1.3 Kernel
When the kernel starts executing, it will run the shell script /etc/rc.sh. The rc.sh script does the following:
1. Sets the Real Time Clock
2. Mounts the /mnt/ffs JFFS2 file system
3. Starts networking by executing the shell script /mnt/etc/rc.network
4. Initializes hardware specific features by executing the shell script /mnt/etc/rc.hardware
5. Starts the xinetd services (telnet and ftp)
6. Starts the application programs by executing the shell script /mnt/ffs/etc/rc.application

16 of 16
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

4.1.4 Linux Console


The RMU Linux kernel is configured to use COM2 as its keyboard and console. The following BusyBox
commands are supported by the keyboard/console:

Built-in commands:

basename busybox break cat cd


chgrp chmod chown chroot clear
cmp continue cp cut date
dd df dirname dmesg du
echo env eval exec exit
export expr false find free
grep gunzip gzip halt head
help hostname id ifconfig init
insmod kill killall klogd ln
logger login ls lsmod makedevs
md5sum mkdir mknod mkswap more
mount msh mv newgrp pidof
ping pivot_root printf ps pwd
rdate read readonly reboot reset
rm rmdir rmmod route sed
set sh shift sleep sort
stty swapoff swapon sync syslogd
tail tar tee telnet test
times touch tr trap true
tty umask umount unname update
usleep vi wait wc wget
which whoami which whoami xargs
yes zcat [

The BusyBox command documentation can also be found at http://www.busybox.net/.

4.1.5 Embedded Web Server


RMU Applications innately use an MKS web server which is running as a default. An Additional BOA
web server is also installed. BOA documentation can be found at http://www.boa.org/. In order to use the
BOA web server, it needs to be started and configured.

Edit “/mnt/ffs/etc/rc.application”

17 of 17
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

4.2 Development Tools:


To build applications to run on the RMU, acquire the DENX Software Engineering Embedded Linux
Development Kit (ELDK) 2.1.0. The ELDK provides cross compilation tools to allow the user to develop
RMU applications on ELDK supported host platforms. The ELDK 2.1.0 Tools can be obtained from
DENX at http://www.denx.de. To correctly interface with the RMU kernel and the associated runtime
libraries, it is imperative that the application code be build with ELDK 2.1.0 tools.

Downloading and Running Applications:


1. Use FTP on the host system to download the application executable to the RMU /mnt/ffs file
system.
2. Telnet to the RMU to run the application. Login “root:root”.

To autostart the new application, telnet to the RMU and add the application to the startup script
/mnt/ffs/etc/rc.application.

4.3 Example Application: “Hello World”

On the host, create, compile and link the “Hello World” program
1. Create a hello.c file (on the host) containing the following text:
#include <stdio.h>

void main()
{
printf("\nHello World\n");
}
2. Compile and link the file using the following ELDK commands:
/opt/eldk/usr/bin/ppc_8xx-gcc -c -o hello.o hello.c
/opt/eldk/usr/bin/ppc_8xx-gcc –s hello.o –o hello

Create a test folder on the RMU


1. From the host, Telnet to the RMU (login as root with the password root)
2. Use the mkdir /mnt/ffs/testdir command to create a folder on the RMU

Download the executable from the host to the RMU


1. From the host, ftp the executable to the RMU by using the following command:
ftp <your RMU IP address>
2. Login as root with the password as root
3. Use the ftp command bin to make sure the transfer will be in binary mode
4. Use following ftp command to transfer the Hello World executable to the RMU’s
/mnt/ffs/testdir folder
put hello /mnt/ffs/testdir/hello

Make the downloaded file executable


1. Using Telnet, use the cd /mnt/ffs/testdir command to change locations to RMU test directory
2. Use the chmod +x hello command to make the hello file executable
18 of 18
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

Run the program


1. Using Telnet, use the ./hello command to run the program
2. Observe the “Hello World” output.

Make the program run when the RMU is (re)booted


1. Using Tenet, edit the file rc.application and add the following line
/mnt/ffs/testdir/hello
2. Using the RMU Console, enter a Control C to stop all the applications
3. Enter the command reboot or cycle the RMU power to reboot the RMU
4. Observe the Hello World output

4.4 Example Application: Analog and Digital I/O

The RMU uses a memory mapped I²C board for Analog and Digital Inputs and Digital Outputs. The
application programmer can use the following function (prototype) calls to access the RMU Digital and
Analog I/O pins:

Basic I/O functionality


1. int iox_open();
2. void iox_close();
3. int iox_read(u_char addr, uint offset, char *buf, uint len);
4. int iox_write(u_char addr, uint offset, char *buf, uint len);

Setup and configuration


1. int iox_reset(u_char addr);
2. int iox_get_configuration(u_char addr, u_char *config);

Get Digital Inputs, Get/Set Digital Outputs and Get Analog Inputs
1. int iox_set_do(u_char addr, uint bit_num, int value);
2. int iox_get_do(u_char addr, uint bit_num, int *value);
3. int iox_get_do_internal(u_char addr, uint bit_num, int *value);
4. int iox_get_di(u_char addr, uint bit_num, int *value);
5. int iox_get_ai_raw(u_char addr, uint ai_num, int *value);
6. int iox_get_ai(u_char addr, uint ai_num, float *value);

Performance Considerations
The iox_get and iox_set function call get or set one value per call. For better real time performance, the
iox_read and iox_write calls allow the programmer to get and set multiple analog or digital values in one
call. The following is an example of reading four analog inputs:

unsigned short pVal[4];


double pValues[4];

int nCount = iox_read(0x50, IOX_AI_ADDRESS(0), (char*)pVal, 8);


if (nCount == 8)
for (int i=0; i<4; i++)
19 of 19
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

pValues[nVal++] = (double)pVal[i] / 409.6;


else ...

RMU IOX Demo Program

The following demonstration program uses some of the supplied RMU IOX Lib Function calls. A soft copy
of the program and the associated lib are available on request.

/*
* RMU iox_demo.c
*
* The purpose of the program is to show how to read MKS RMU IOX analog
* and digital inputs and how to set digital outputs.
*
* This example pgm is a simple 5.0VDC Set Point Controller with 10%
* hysteresis.
* If the RMU Analog Input AI1 goes below 4.75 VDC then Close
* RMU Digital Output O1 relay.
* If the RMU Analog Input AI1 goes above 5.25 VDC then Open
* RMU Digital Output O1 relay.
* If the RMU Digital Input Pin I1 is or goes high then the demo
* will terminate.
*
* This program is for demonstration purposes only.
*
*/

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <sys/time.h>
#include <unistd.h>
#include <ctype.h>

#include "iox_lib.h"
#include "iox_dev_comm.h"

/* Base address of the I2C IOX board */


#define IOX_ADDRESS 0x50

/* Input/Output Bit Addresses for Digital and Analog I/O */


#define IOX_O1_OUT 7
#define IOX_I1_IN 7
#define IOX_A1 0

/* function to handle a Control-C Signal */


void abort_sig_handler( int nSID )
{
printf( "Terminating application...\n" );
20 of 20
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

iox_close(); /* Close the /dev/i2c device */


exit( 0 );
}

int main()
{
int enableTest; // Value of the D0 Input pin
uint ai_val; // Raw Input Voltage (counts)
float ai_voltage; // Floating Point Voltage
int do_o1_state = IOX_DIO_OFF; // Digital Output O1 state
int loopCounter = 0; // Loop Counter for debug

/* Open the /dev/i2c device */


if ( iox_open() < 0 )
{
printf( "--- ERROR: Cannot open /dev/i2c\n" );
return 0x0100;
}

/* Call the abort function to handle a Control-C Signal */


signal( 2, abort_sig_handler );

/* Read the Digital Input enable pin I1 */


/* Pgm terminates when this pin is high */
iox_get_di( IOX_ADDRESS, IOX_I1_IN, &enableTest );

/* Set the Digital Output Control pin O2 to 0*/


iox_set_do ( IOX_ADDRESS, IOX_O1_OUT, IOX_DIO_OFF );

printf( " ** Starting IOX Demo Pgm **\n\n" );

/* Loop while the I1 Input Pin is low */


while ( enableTest == 0 )
{
/* Read the Analog Input */
iox_get_ai_raw( IOX_ADDRESS, IOX_A1, &ai_val );

/* Convert the raw alanog value of 0-4095 value to a 0-10VDC


floating point value */
ai_voltage = ai_val / 409.6;

/* Is the voltage higher than 5.25VDC*/


if (( ai_voltage > 5.25 ) && ( do_o1_state == IOX_DIO_ON ))
{
/* Open the O1 output relay */
do_o1_state = IOX_DIO_OFF;
iox_set_do ( IOX_ADDRESS, IOX_O1_OUT, IOX_DIO_OFF );
}

/* Is the voltage lower than 4.75VDC */


if (( ai_voltage < 4.75 ) && ( do_o1_state == IOX_DIO_OFF ))
{
/* Close the O1 output relay */
21 of 21
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

do_o1_state = IOX_DIO_ON;
iox_set_do ( IOX_ADDRESS, IOX_O1_OUT, IOX_DIO_ON );
}

/* Debug Prints */
//printf( "Loop %d, ai_val %x, ai_voltage %f, do_o1_state %x\n",
//loopCounter++, ai_val, ai_voltage, do_o1_state );

/* Delay 100ms */
usleep( 100*1000 );

/*read the Digital Input enable pin*/


iox_get_di( IOX_ADDRESS, IOX_I1_IN, &enableTest );
}

/* Demo Complete - Close the /mnt/i2c file */


iox_close();

printf( "\n\n** Demo complete **\n\n" );

return 0;
}

For clarity and simplicity, the demo program does not check the return codes of the IOX Lib functions.

4.5 Example Application: Serial COM Ports

The RMU supports three Serial Communication Ports (COM1-3). An application program can connect to
and transmit on or receive from any of the ports. As can be seen in the RMU COM Port configuration
documentation, two of the ports support Asynchronous Serial RS-232 or RS-485 and the other port
(COM1) supports RS-232 Serial Communications with Hardware Flow Control.

RMU COMx Port Demo Program

The following demonstration program shows how to read and write characters to a RMU Serial COM
Port. A soft copy of the program and the associated lib are available on request.

/*
* RMU com_demo.c
*
* The purpose of the program is to show how to do simple
* read/write I/O to the RMU COM1 Serial Port.
*
* This example program prompts and displays the value of one of
* the RMU Analog Inputs. Connect a dumb terminal (9600, 8, np) or
* a PC terminal emulator pgm ( minicom or hyperterm ) to RMU COM3.
* Use the RMU console or a telnet session to start the program.
* The program prompts the user for an Analog Input Port and will

22 of 22
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

* then display the associated voltage. The user may enter the
* 'q' key to terminate the program.
*
* This program is for demonstration purposes only.
*
*/

#include <stdio.h>
#include <sys/ioctl.h>
#include <fcntl.h>
#include <termios.h>
#include <unistd.h>

#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <ctype.h>

#include "iox_lib.h"
#include "iox_dev_comm.h"

/* Base address of the I2C IOX board */


#define IOX_ADDRESS 0x50
#define TRUE 1
#define FALSE 0

/////////////////////////////////////////////////////////

/* Open the RMU COM1 port for I/O */

int OpenComm(char *szDevice, int nBaud) {

int nBaudRate;
int nFD = -1;
struct termios ts;

/* Use the standard POSIX termios structure to configure


a RMU COMx Port - for details see POSIX documentation */

switch (nBaud)
{
case 150 : nBaudRate = B150; break;
case 300 : nBaudRate = B300; break;
case 600 : nBaudRate = B600; break;
case 1200 : nBaudRate = B1200; break;
case 2400 : nBaudRate = B2400; break;
case 4800 : nBaudRate = B4800; break;
case 9600 : nBaudRate = B9600; break;
case 19200 : nBaudRate = B19200; break;
case 38400 : nBaudRate = B38400; break;
case 57600 : nBaudRate = B57600; break;
case 115200 : nBaudRate = B115200; break;
default : nBaudRate = B19200;
23 of 23
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

memset(&ts, 0, sizeof(ts));

ts.c_cflag = nBaudRate | CS8 | CREAD | CLOCAL;


ts.c_iflag = IGNBRK | IGNPAR;
ts.c_cc[VMIN] = (cc_t)1;
ts.c_cc[VTIME] = (cc_t)1;

/* Open the device */


if ((nFD = open(szDevice, O_RDWR)) == -1) return -1;

/* Set the configuration values */


if (ioctl(nFD, TCSETS, &ts) < 0)
{
close(nFD);
return -1;
}

return nFD;
}

//////////////////////////////////////////////////////////

/* function to handle a Control-C Signal */

void abort_sig_handler( int nSID )


{
printf( "Terminating application...\n" );
iox_close(); /* Close the /dev/i2c device */
exit( 0 );
}

/////////////////////////////////////////////////////////

int main()
{
char szHeaderStr[] =
"Display Analog Pin Value 1-4 or q to quit\r\n";
char szPromptStr[] = "Analog Pin # ";
char szErrorStr[] = " Input Out Of Range - 1-4";
int nFD = OpenComm("/dev/ttyS1", 9600); /* COM3 */
char buf[20];
int buf_len;
float fAnalogValue;
int nErrorFlag = FALSE;
char outputBuf[20];
int nRC;

/* Call the abort function to handle a Control-C Signal */


signal( 2, abort_sig_handler );

24 of 24
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

/* Clear the input and output buffers */


memset(buf, 0, sizeof(buf));
memset(outputBuf, 0, sizeof(outputBuf));

/* Check to see if the COM3 open failed */


if (nFD == -1)
{
perror("Cannot open \"/dev/ttyS1\"\n");
return 0x01;
}

/* Open the /dev/i2c device to read the Analog Ports */


if ( iox_open() < 0 )
{
printf( "--- ERROR: Cannot open /dev/i2c\n" );
return 0x0100;
}

/* Output carrage return line feed(s) */


write (nFD, "\n\r\n\r", 4);

/* Display the header on COM1 */


if (write(nFD, szHeaderStr, sizeof(szHeaderStr)) !=
sizeof(szHeaderStr))
perror("Error writing to \"/dev/ttyS1\"\n");

/* Loop until the pgm is killed or user inputs 'Q' */


while(1)
{
nErrorFlag = FALSE;

/* Prompt for Analog Port Number */


if (write(nFD, szPromptStr, sizeof(szPromptStr)) !=
sizeof(szPromptStr))
perror("Error writing to \"/dev/ttyS1\"\n");

/* Get one char input */


buf_len = read(nFD, buf, sizeof(buf));

/* Echo the input */


write(nFD,buf,buf_len);

/* Process the input */


switch (buf[0])
{
case '1': /* RMU AI1 */
iox_get_ai( IOX_ADDRESS, 1, &fAnalogValue );
break;

case '2': /* RMU AI2 */


iox_get_ai( IOX_ADDRESS, 2, &fAnalogValue );
break;

case '3': /* RMU AI3 */


25 of 25
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

iox_get_ai( IOX_ADDRESS, 3, &fAnalogValue );


break;

case '4': /* RMU AI4 */


iox_get_ai( IOX_ADDRESS, 4, &fAnalogValue );
break;

case 'q':
case 'Q':
close(nFD);
exit(0);

default:
write(nFD,szErrorStr, sizeof(szErrorStr));
nErrorFlag = TRUE;
}

/* Convert and display the output */


if ( nErrorFlag == FALSE )
{
nRC = snprintf(outputBuf, 15, " %fVDC", fAnalogValue);

if (nRC > 0 )
write(nFD, outputBuf, nRC);
}

/* Output carrage return line feed(s) */


write (nFD, "\n\r\n\r", 4);
}
}

For clarity and simplicity, the demo program does not check the return codes of some of the function
calls.

26 of 26
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

Appendix A - RMU SPECIFICATIONS

Processor
CPU 32-bit RISC Power PC, 50MHz CPU
Memory 32MB SDRAM
Flash 16MB
Data Collection Memory 7MB Flash (part of 16MB Flash)
Real Time Clock Lithium battery-backed

Communications
Ethernet Port 10BaseT, RJ45 connector with EMI filter, LED indicators
RS232 Port TXD, RXD, RTS, CTS signals; DB9 connector
RS232/RS422/485 Ports Switch selectable RS232 (TXD, RXD) or RS422 (4-wire); DB9 connector
Serial Baud Rates 300bps to 115Kbps (38.4Kbps maximum with all 3 ports operating continuously).

Analog Input
Channels 8 S.E. / 16 S.E. / 4 DIFF / 8 DIFF
Resolution 12-bit
Input Range 0-10V / 0-20mA
Over Voltage 15 VDC (max)
Input Impedance 70MOhm

Digital Inputs
Input Lines 4/8
Input Voltage 24VDC (internally supplied)
ON current level >2mA
OFF voltage level <1mA
Minimum ON voltage 6VDC
Maximum OFF voltage 18VDC
Maximum current 30mA

Digital Outputs
Output Lines 4/8
Type dry contact relay, 1 amp maximum

General
Power Supply 18VDC to 28VDC
Power Consumption 10W typical, 25W maximum
Dimensions LxHxW 103 x 100 x 50 mm (Single Slot) / 103 x 100 x 75 mm (Double Slot)
Operating Temperature 0C to 50C
Storage Temperature -40C to 85C
CE pending
UL/CSA pending

27 of 27
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

Appendix B - Model Code Description


The model code of each RMU™ defines the features of the unit for hardware, software and other options:

XXXX Hxx Sxx Px

Product Type

H/W

S/W

Options

Product Type
TWSL RMU ™ with TOOLweb™ ToolSide interface (blue/white)
RMIO RMU with RMU™ application software (black)

H/W (Hardware)
H002

H003

H004

H005

H006

H007

H008

H009

H/W Details
4AI-DIF 16bit, 4DI

4AI-Current, 4DI

8AI-Current, 8DI
16AI-SE, 8DI
4AI-DIF, 4DI

8AI-DIF, 8DI
8AI-SE, 4DI

Gateway

Model Description
I/O Slots 1 1 2 2 1 1 2 0
Serial COM Ports 3 3 3 3 3 3 3 3 (2) RS232, (1) RS232/485 hardware selectable
Analog inputs, differential, voltage 4 8 0 - 10V, 12 bit
Analog inputs, differential, voltage, 16 bit 4 0 - 10V, 16 bit
Analog inputs, single-ended, voltage 8 16 0 - 10V, 12 bit
Analog inputs, differential, current 4 8 4 - 20mA, 12 bit
Digital inputs 4 4 8 8 4 4 8 0 active low, opto-coupler input
Digital outputs 4 4 8 8 4 4 8 0 relay dry contact output, normally open

S/W (Software)
S004 RMU™ for single slot I/O unit
S00x Various software builds and customer specific versions

Options
P0x Various serial protocol and customer specific functionality
Consult factory for specific application requests

28 of 28
© MKS Instruments CIT Products 2004, All rights reserved
RMU User Manual Version 1.1.6

WARRANTY

MKS Instruments, Inc. (MKS) warrants that for two years from the date of shipment the equipment
described above (the “equipment”) manufactured by MKS shall be free from defects in materials and
workmanship and will correctly perform all date-related operations, including without limitation accepting
data entry, sequencing, sorting, comparing, and reporting, regardless of the date the operation is
performed or the date involved in the operation, provided that, if the equipment exchanges data or is
otherwise used with equipment, software, or other products of others, such products of others
themselves correctly perform all date-related operations and store and transmit dates and date-related
data in a format compatible with MKS equipment. THIS WARRANTY IS MKS’ SOLE WARRANTY
CONCERNING DATE-RELATED OPERATIONS.
For the period commencing with the date of shipment of this equipment and ending two years later, MKS
will, at its option, either repair or replace any part which is defective in materials or workmanship or with
respect to the date-related operations warranty without charge to the purchaser. The foregoing shall
constitute the exclusive and sole remedy of the purchaser for any breach by MKS of this warranty.
The purchaser, before returning any equipment covered by this warranty, which is asserted to be
defective by the purchaser, shall make specific written arrangements with respect to the responsibility for
shipping the equipment and handling any other incidental charges with the MKS sales representative or
distributor from which the equipment was purchased or, in the case of a direct purchase from MKS, with
the MKS-CIT home office in Santa Clara, CA
This warranty does not apply to any equipment, which has not been installed and used in accordance
with the specifications recommended by MKS for the proper and normal use of the equipment. MKS
shall not be liable under any circumstances for indirect, special, consequential, or incidental damages in
connection with, or arising out of, the sale, performance, or use of the equipment covered by this
warranty.
THIS WARRANTY IS IN LIEU OF ALL OTHER RELEVANT WARRANTIES, EXPRESSED OR IMPLIED,
INCLUDING THE IMPLIED WARRANTY OF MERCHANTABILITY AND THE IMPLIED WARRANTY OF
FITNESS FOR A PARTICULAR PURPOSE, AND ANY WARRANTY AGAINST INFRINGEMENT OF
ANY PATENT.

29 of 29
© MKS Instruments CIT Products 2004, All rights reserved

You might also like