Galil Motion Control IOC-7007 User Manual

IOC-7007
Manual Rev. 1.0c
By Galil Motion Control, Inc.
USER MANUAL
Galil Motion Control, Inc.
270 Technology Way
Phone: (916) 626-0101
Fax: (916) 626-0102
Internet Address: support@galilmc.com
URL: www.galilmc.com
Rev Date: 12/08
Contents
CHAPTER 1 OVERVIEW ............................................................................................. 1
INTRODUCTION ................................................................................................................ 1
IOC-7007 FUNCTIONAL ELEMENTS.................................................................................1
Microcomputer Section............................................................................................... 1
Communication........................................................................................................... 1
CHAPTER 2 GETTING STARTED ............................................................................. 3
THE IOC-7007 I/O CONTROLLER .................................................................................... 3
INSTALLING THE IOC-7007 BOARD................................................................................. 4
Step 1. Configure Jumpers.......................................................................................... 4
Step2. Plug in the Desired IOM Modules................................................................... 6
Step 3. Connecting Power to the IOC-7007................................................................ 6
Step 4. Install the Communications Software............................................................. 6
Step 5. Establish Communications between IOC-7007 and the Host PC................... 7
Using Galil Software for DOS.................................................................................... 7
Using Galil Software for Windows 95 and 98 First Edition....................................... 7
Using Galil Software for Windows 98 SE, NT 4.0, 2000, ME, and XP..................... 8
Using Non-Galil Communication Software................................................................ 9
Using Galil Software for Windows 95 and 98 FE.................................................... 10
Using Galil Software in Windows 98 SE, NT 4.0, 2000, ME, and XP.................... 11
Step 6. Configure the Distributed Control System ................................................... 14
CHAPTER 3 COMMUNICATION ............................................................................. 15
INTRODUCTION .............................................................................................................. 15
RS232 PORT .................................................................................................................. 15
RS232 - Port 1 DATATERM ................................................................................ 15
RS-232 Configuration............................................................................................... 15
ETHERNET CONFIGURATION .......................................................................................... 16
Communication Protocols......................................................................................... 16
Addressing ................................................................................................................ 16
Communicating with Multiple Devices.................................................................... 17
IOC-7007 Support in Galil’s Distributed network.................................................... 18
IOC-7007 as Modbus master.................................................................................... 19
IOC-7007 as Modbus Slave...................................................................................... 20
Handling Communication Errors.............................................................................. 20
Multicasting .............................................................................................................. 20
Unsolicited Message Handling................................................................................. 20
Using Third Party Software...................................................................................... 21
DATA RECORD............................................................................................................... 21
QR Command ........................................................................................................... 21
Data Record Map...................................................................................................... 21
IOC-7007 Contents i
Explanation of Status Information............................................................................ 22
CHAPTER 4 IOM MODULES .................................................................................... 25
INTRODUCTION .............................................................................................................. 25
MODULE SPECIFICATIONS.............................................................................................. 26
IOM-70016: 16-TTL input module ......................................................................... 26
IOM-70108: 8 Opto-isolated input module ............................................................. 27
IOM-70208: 8 Opto-isolated output module ........................................................... 29
IOM-70308: 8 Opto-isolated power output module ................................................ 31
IOM-70404: 4 Dry contact relay output module ..................................................... 32
IOM-70508: 8 Opto-isolated high power outputs..................................................... 34
IOM-70808: 8 Analog input module ....................................................................... 35
IOM-70908: 8 Analog output module ..................................................................... 37
IOM-70904: 4 Analog output module ..................................................................... 38
CHAPTER 5 COMMAND REFERENCE ................................................................. 42
INSTRUCTION SET .......................................................................................................... 42
Ethernet Commands.................................................................................................. 42
I/O Commands.......................................................................................................... 42
Interrogation Commands .......................................................................................... 42
Math/Special Functions ............................................................................................ 43
Programming Commands......................................................................................... 43
System Configuration............................................................................................... 44
Trippoint Commands................................................................................................ 44
PLC Mode Commands.............................................................................................. 44
COMMANDS ................................................................................................................... 45
AA............................................................................................................................. 45
AB............................................................................................................................. 46
AI .............................................................................................................................. 47
AO............................................................................................................................. 48
AT............................................................................................................................. 49
BN............................................................................................................................. 50
BP.............................................................................................................................. 51
BV............................................................................................................................. 52
CB............................................................................................................................. 53
Note: When communicating between two IOC modules using SB/CB commands –
Port 502 must be used when opening the handle (IH). CF....................................... 53
CF.............................................................................................................................. 54
CP.............................................................................................................................. 55
CW............................................................................................................................ 56
DA............................................................................................................................. 57
DL............................................................................................................................. 58
DM............................................................................................................................ 59
DR............................................................................................................................. 60
ED............................................................................................................................. 61
ELSE......................................................................................................................... 62
EN............................................................................................................................. 63
ii Contents IOC-7007
ENDIF....................................................................................................................... 64
EO............................................................................................................................. 65
HP ............................................................................................................................. 66
HS ............................................................................................................................. 67
HX............................................................................................................................. 68
IA .............................................................................................................................. 69
IF............................................................................................................................... 70
IH .............................................................................................................................. 71
II................................................................................................................................ 73
IN .............................................................................................................................. 75
JP............................................................................................................................... 76
JS............................................................................................................................... 77
LA............................................................................................................................. 78
LL.............................................................................................................................. 79
LR ............................................................................................................................. 80
LS.............................................................................................................................. 81
LV............................................................................................................................. 82
LZ.............................................................................................................................. 83
MB ............................................................................................................................ 84
MG............................................................................................................................ 86
MW........................................................................................................................... 87
OB............................................................................................................................. 89
OQ............................................................................................................................. 90
QD............................................................................................................................. 91
QR............................................................................................................................. 92
QU............................................................................................................................. 93
QZ............................................................................................................................. 94
RA............................................................................................................................. 95
RC............................................................................................................................. 96
RD............................................................................................................................. 97
RI............................................................................................................................... 98
RS.............................................................................................................................. 99
<control>R<control>S............................................................................................ 100
<control>R<control>V........................................................................................... 101
SA ........................................................................................................................... 102
SB............................................................................................................................ 104
Note: When communicating between two IOC modules using SB/CB commands –
Port 502 must be used when opening the handle (IH).TB...................................... 104
TB ........................................................................................................................... 105
TC ........................................................................................................................... 106
TH........................................................................................................................... 108
TI............................................................................................................................. 109
TIME*..................................................................................................................... 110
TQ........................................................................................................................... 111
TR ........................................................................................................................... 112
TX........................................................................................................................... 113
IOC-7007 Contents iii
TZ............................................................................................................................ 114
UL........................................................................................................................... 115
VF ........................................................................................................................... 116
WH.......................................................................................................................... 117
WT .......................................................................................................................... 118
XP ........................................................................................................................... 119
XQ........................................................................................................................... 120
ZC ........................................................................................................................... 121
ZD........................................................................................................................... 122
ZS............................................................................................................................ 123
CHAPTER 6 APPLICATION PROGRAMMING................................................... 125
OVERVIEW................................................................................................................... 125
EDITING PROGRAMS .................................................................................................... 125
Edit Mode Commands ............................................................................................ 126
PROGRAM FORMAT...................................................................................................... 127
Using Labels in Programs....................................................................................... 127
Special Labels......................................................................................................... 127
Commenting Programs ........................................................................................... 128
EXECUTING PROGRAMS - MULTITASKING.................................................................... 128
#PLCSCAN thread.................................................................................................. 129
DEBUGGING PROGRAMS .............................................................................................. 130
Trace Commands.................................................................................................... 130
Error Code Command............................................................................................. 130
RAM Memory Interrogation Commands................................................................ 130
Operands................................................................................................................. 131
Debugging Example: .............................................................................................. 131
PROGRAM FLOW COMMANDS ...................................................................................... 131
Interrupts................................................................................................................. 131
Examples:................................................................................................................ 132
Conditional Jumps .................................................................................................. 133
Using If, Else, and Endif Commands...................................................................... 135
Stack Manipulation................................................................................................. 136
Auto-Start Routine.................................................................................................. 136
Automatic Subroutines for Monitoring Conditions................................................ 136
MATHEMATICAL AND FUNCTIONAL EXPRESSIONS....................................................... 139
Mathematical Operators.......................................................................................... 139
Bit-Wise Operators ................................................................................................. 139
Functions................................................................................................................. 140
VARIABLES .................................................................................................................. 141
Programmable Variables......................................................................................... 141
OPERANDS ................................................................................................................... 142
Examples of Internal Variables:.............................................................................. 142
Special Operands (Keywords) ................................................................................ 142
ARRAYS ....................................................................................................................... 143
Defining Arrays ...................................................................................................... 143
Assignment of Array Entries .................................................................................. 143
iv Contents IOC-7007
Using a Variable to Address Array Elements......................................................... 144
Uploading and Downloading Arrays to On Board Memory................................... 144
Automatic Data Capture into Arrays ...................................................................... 144
Deallocating Array Space....................................................................................... 145
INPUT OF DATA (NUMERIC AND STRING)..................................................................... 145
Input of Data........................................................................................................... 145
OUTPUT OF DATA (NUMERIC AND STRING) ................................................................. 146
Sending Messages................................................................................................... 146
Displaying Variables and Arrays............................................................................ 147
Formatting Variables and Array Elements ............................................................. 148
PROGRAMMABLE I/O................................................................................................... 149
Digital Outputs........................................................................................................ 149
Digital Inputs .......................................................................................................... 150
Input Interrupt Function.......................................................................................... 150
Analog Inputs.......................................................................................................... 150
Analog Outputs....................................................................................................... 151
APPENDIX.................................................................................................................... 153
ELECTRICAL SPECIFICATIONS ...................................................................................... 153
Input/Output............................................................................................................ 153
Power Requirements............................................................................................... 153
PERFORMANCE SPECIFICATIONS .................................................................................. 153
CONNECTORS ON THE IOC-7007.................................................................................. 153
J9 RS-232 Port: DB-9 Pin Male............................................................................. 153
J11 Ethernet Port: 10/100 Base-T (RJ-45).............................................................. 154
J8 Power: 4 pin Molex for 20-60VDC.................................................................... 154
J10 Power: 6 pin Molex for 90-260VAC 50/60Hz Power supply (IOC-7007 Box)
................................................................................................................................. 154
CABLE CONNECTIONS FOR IOC-7007.......................................................................... 155
Standard RS-232 Specifications ............................................................................. 155
IOC-7007 Serial Cable Specifications.................................................................... 156
JUMPER DESCRIPTION FOR IOC-7007.......................................................................... 157
ACCESSORIES AND OPTIONS ........................................................................................ 157
IOC-7007 DIMENSIONS ............................................................................................... 158
EXAMPLE- COMMUNICATING WITH OPTO-22 SNAP-B3000-ENET........................... 159
LIST OF OTHER PUBLICATIONS .................................................................................... 161
TRAINING SEMINARS ................................................................................................... 161
CONTACTING US.......................................................................................................... 162
WARRANTY ............................................................................................................. 163
Index ....................................................................................................................... 165
IOC-7007 Contents • v

Chapter 1 Overview

Introduction

Derived from the same fundamentals used in building the Galil motion controllers, the IOC-7007 is a programmable I/O board that conveniently interfaces with other Galil boards through its Ethernet port. The IOC-7007 is programmed exactly the same way as a DMC (Galil controller) with the exception of a few revised commands and the removal of all motion-related commands. Communication with the IOC-7007 even works the same way as with other Galil controllers, and it utilizes the same software programs, such as the DMC Terminal. New interrogation commands have been created to allow a user to instantly view the entire I/O status, thread execution, or Ethernet handle availability (see the TZ, TQ and TH commands in Chapter 5).
The purpose of an IOC-7007 board is to offer remote I/O in a system and the ability to synchronize complex events. To do this, the IOC-7007 accepts up to 7 plug-in I/O modules (starting with the abbreviation IOM for Input/Output Module) that can be “mixed and matched” according to the system requirements. There are 8 different IOM variations currently available, consisting of digital inputs, digital outputs, analog inputs, or analog outputs. See Chapter 4 for IOM specifications.
Packaging options for the IOC-7007 include a card level product (IOC board and IOM modules only), a box level product with a steel enclosure, and a DIN rail mountable version. The IOC can be powered with either a 90-260VAC 50/60Hz input or a 20-60V DC input. The AC option is only available on the IOC-7007-Box.

IOC-7007 Functional Elements

Microcomputer Section
The main processing unit of the IOC-7007 is a specialized 32-bit, 25MHz Motorola 68331 Series Microcomputer with 1 Mbit RAM and 2 Mbit Flash EEPROM. The RAM provides memory for variables, array elements and application programs. The flash EEPROM provides non-volatile storage of variables, programs, and arrays; it also contains the IOC-7007 firmware.
The IOC-7007 can processes individual Galil Commands in less than 100 microseconds. The Non-volatile memory includes 500 lines x 80 characters of program space, 126 symbolic variables, 126 labels, and 2000 array elements in up to 14 arrays.
Communication
The communication interface with the IOC-7007 consists of one RS-232 port (default is 19.2 kBaud/s) and one auto negotiating 10/100Base-T Ethernet port.
IOC-7007 Chapter 1 Overview 1
There are six status LEDs on the IOC that indicate operating and error conditions on the controller. Figure 1­1 shows a diagram of the LED bank followed by the description of the six lights.
ERR GRO FUL PWR LNK SPD
R
YY
GGG
Figure 1-1 - Diagram of LED bank on the IOC-7007
Green Power LED (PWR) - The green status LED indicates that the power has been applied
properly to the IOC.
Red Status/Error LED (ERR) - The red error LED will flash on initially at power up, and stay lit
for approximately 1 – 8 seconds before turning off. After this initial power up condition, the LED will illuminate for the following reasons:
1. The reset line on the controller is held low or is being affected by noise.
2. There is a failure on the controller and the processor is resetting itself.
3. There is a failure with the output IC that drives the error signal. Green Activity LED (LNK) – The yellow LED indicates traffic across the Ethernet connection.
This LED will show both transmit and receive activity across the connection. It illuminates with a good link and then blinks when activity is detected. If the controller ha s not been assigned an IP address, it will send BOOTP packets at regular intervals as indicated by the rhythmic blinking of this LED. Once the IP address is assigned, the LED will only blink with Ethernet traffic. Also, if an IP address isn’t burned in with the BN command, the next time power is cycled or a reset is issued, the IP address will be lost and the controller will begin to issue BOOTP packets again.
General Purpose Output (GRO) – This LED is not currently used by the IOC-7007. Ethernet Speed LED (SPD) - This LED will light up if the Ethernet connection is 100 Base-T. Full Duplex LED (FUL) – This LED turns on when the Ethernet connection is full duplex.
2 Chapter 1 Overview IOC-7007

Chapter 2 Getting Started

The IOC-7007 I/O Controller

6
J10
1
J8
Figure 2-1: - Outline of IOC-7007
1 Motorola 68331 microprocessor J8 4 pin Molex for 20-60 VDC connection
2 ASIX Ethernet Chip J9 RS232 Serial connection
3 Xilinx I/O chip J10 250V-2A Fuse for 20-60 VDC input, or 6
4 Error LEDs for active Ethernet
JP5
5
connection, transmit/receive on Ethernet, error output and power
J9
2
4
3
J1 J2 J3 J4 J5 J6 J7
JP1
J11
pin Molex for AC power supply.
J11 10/100 BaseT Ethernet Port
5 Reset Button JP1 Adress selection jumpers
6 RAM JP5 Master reset , upgrade and baud rate
selection jumpers.
J1-J7 26 pin connectors for I/O Slots 0
through 6
IOC-7007 Chapter 2 Getting Started 3

Installing the IOC-7007 Board

Installation of a complete, operational IOC-7007 system consists of 6 steps: Step 1. Configure jumpers Step 2. Plug in the desired IOM modules Step 3. Connect power to the IOC-7007 Step 4. Install the communications software Step 5. Establish communications between the IOC-7007 and the host PC Step 6. Configure the IOC for Galil’s Distributed Control System
Step 1. Configure Jumpers

Master Reset and Upgrade Jumper

Jumpers labeled as MRST and UPGD are located at JP5, adjacent to the reset button. The MRST jumper is for a master reset. When MRST is connected, the IOC-7007 will perform a master reset upon power recycle to the board or when the board reset button is pushed. Whenever the I/O board has a master reset, all programs, arrays, and variables stored in EEPROM will be erased.
The UPGD jumper enables the user to unconditionally update the board firmware. This jumper is not necessary for firmware updates when the IOC board is operating normally, but may be necessary in cases of a corrupted EEPROM. EEPROM corruption should never occur under normal operating circumstances; however, corruption is possible if there is a power fault during a firmware update. If EEPROM corruption occurs, your board may not operate properly. In this case, install the UPGD jumper and use the update firmware function on the Galil Terminal to re-load the system firmware.
Setting the Baud Rate on the IOC-7007
The jumpers labeled “1200” and “9600,” also located at JP5, allow the user to select the serial communication baud rate. The baud rate can be set using the follo wi n g ta bl e:
9600 1200 BAUD RATE
OFF OFF 19200
ON OFF 9600
OFF ON 1200
The default baud rate for the IOC-7007 is 19.2K (no jumpers).
4 Chapter 2 Getting Started IOC-7007
Distributed Control Address Jumpers
The IOC-7007 can be set up in a distributed control net w ork with other IOCs and DMC-3425 control l e rs . In this configuration, the controllers and IOCs act as if they were one multi-axis controller. The host computer communicates to only one master controller, and the master coordinates data transfer between the other controllers and IOCs in the network. For more information on distributed control, see the DMC-3425 User Manual.
The HC command, available on the DMC-3425, is used to automatically configure the various controllers and IOCs in a Galil distributed network. If this command is used, then each IOC must have a jumper corresponding to its address setting in the distributed network.
The 16-pin jumper, found at location JP1, is used to select address settings for the IOC-7007. Jumpers at this location are labeled ADR1, ADR2, ADR4 and ADR8, which represent the binary value for each of the 8 addresses available for an IOC. The following chart shows the proper jumper settings for every possible address selection.
IOC #1 ADR1 On ADR2 Off ADR4 Off ADR8 Off
IOC #2 ADR1 Off ADR2 On ADR4 Off ADR8 Off
IOC #3 ADR1 On ADR2 On ADR4 Off ADR8 Off
IOC #4 ADR1 Off ADR2 Off ADR4 On ADR8 Off
IOC #5 ADR1 On ADR2 Off ADR4 On ADR8 Off
IOC #6 ADR1 Off ADR2 On ADR4 On ADR8 Off
IOC #7 ADR1 On ADR2 On ADR4 On ADR8 Off
IOC #8 ADR1 Off ADR2 Off ADR4 Off ADR8 On
If two IOCs are needed for a Galil distributed network then the “IOC #1” jumper setting is used on one of the IOCs and the “IOC #2” setting is used on the other. Likewise, if three IOC’s are configured, then the #1, #2 and #3 settings are used.
For example, the jumper settings for the third IOC in a distributed network are shown below.
ADR1
ADR2
ADR4
ADR8
ND1
ND1
ND1
10B
rd
Fig. 2-2 – Example jumper settings for the 3
IOC-7007 Chapter 2 Getting Started 5
IOC-7007 in a distributed network
10 Base-T jumper
At JP1 there is a set of pins labeled 10B (shown in figure 2.3 above). If a jumper is placed at this location, the Ethernet port on the IOC-7007 will be restricted to 10 Base-T. Normally, the Ethernet port is auto­negotiating between 10 and 100 Base-T, but the user may want to force the port to 10 Base-T when 100 Base-T is not required.
Step2. Plug in the Desired IOM Modules
The IOC-7007 can accommodate up to 7 IOM modules. Plug each module into one of the 26 pin connectors labeled Slot-0 through Slot-6. The user can choose any slot to insert an IOM module. As soon as the IOC is powered, the location of these modules is detected and their configuration as either input or output modules is determined. Also, the IOC detects the number of I/O ports available on each IOM module.
Note: Be sure to connect the IOM modules in such a way that the chips on the modules face in the direction of the IOC power connectors. The edge of the IOM cards should lie in the narrow rectangular silk screening on the IOC.
Step 3. Connecting Power to the IOC-7007
The IOC-7007 has the option for either 20-60 VDC p ower or 90-260 VAC power. The 90-260 VAC powe r option is only available on the IOC-7007-Box.
For the 20-60 VDC option, apply the voltage to the +24 and G terminals of the 4 pin MOLEX connector at J8. The other two pins on J8, E and NC, are for earth ground and no connection. Earth ground can be used if desired.
Warning: Damage can occur if a supply of 60VDC or larger is connected to the board.
For the 90-260 VAC power option, connect the IOC-7007-Bo x directly to AC power from a wall socket. Applying power will turn on the green LED power indicator.
Step 4. Install the Communications Software
After applying power to the computer, install the Galil software that enables communication between the I/O board and your PC.
Using DOS:
Using the Galil Software CD-ROM, go to the directory, DMCDOS. Type "INSTALL" at the DOS prompt and follow the directions.
Using Windows 3.x (16 bit versions):
Using the Galil Software CD-ROM, go to the directory, DMCWIN16. Run DMCWIN16.exe at the Command prompt and follow the directions.
6 Chapter 2 Getting Started IOC-7007
Using Windows 95 or 98 First Edition (32 bit versions):
The Galil Software CD-ROM will automatically begin the installation procedure when the CD-ROM is inserted. After installing the Galil CD-ROM software on the computer, install other software components as desired. To install the basic communications software, run the Galil Software CD-ROM and choose “DMCWIN32 - Windows Utilities and Programming Libraries, WIN95, 98, NT”. This will install the Galil Terminal, which can be used for communication.
Using Windows 98 SE, NT 4, 2000, ME or XP (32 bit versions):
The procedure for installing software for these operating systems is the same as for 95 and 98. However, there are different versions of the same software for these operating systems.
Step 5. Establish Communications between IOC-7007 and the Host PC
Communicating through the RS-232 Serial Communications Port
To use the serial communications, connect the CABLE-9-PIND (straight-through RS-232 cable) between the serial port of the IOC-7007 and the computer or terminal communications port. The IOC-7007 serial port is configured as DATASET. The computer or terminal must therefore be configured as a DATATERM for full duplex, no parity, 8-bit data, one start bit and one stop bit. It should also be configured as a “dumb” terminal, which sends ASCII characters as they are typed to the IOC-7007.
Using Galil Software for DOS
To communicate with the IOC-7007, type TALK2DMC at the prompt. It is necessary to provide information about the IOC, but the model to specify is DMC-1412. Provide the port number and baud rate for communication. Once communication has been esta bl i shed, the terminal display should show a colon, “:”. If a colon is not received, press the carriage return. If a colon prompt is still not returned, there is most likely an incorrect setting of the serial communications port. The user must ensure that the correct communication port and baud rate are specified when attempting to communicate with the I/O board. The user must insure that the proper serial cable is being used (see page
15 for pin-out of serial cable).
Using Galil Software for Windows 95 and 98 First Edition
In order for the windows software to communicate with the IOC-7007, the board must be registered in the Windows Registry. To register this I/O board, specify the model (use DMC-1412), the communication parameters, and other information. The registry is accessed through Galil software, such as DMC Terminal and DTERM (DTERM is installed with DMCWIN and installed as the icon “Galil Terminal”). From DMC Terminal, the registry is accessed under the FILE menu. From the DTERM program, the registry is accessed from the REGISTRY menu.
The registry window is equipped with but t o n s to Add, Change, or Delete a ‘controller.’ Pressing any of these buttons will bring up the Set Registry Information window.
IOC-7007 Chapter 2 Getting Started 7
Use the Add button to add a new entry to the Registry.
Note: Since the new IOC series is not included in the list of models, register it as a DMC-1412 communicating via the RS-232 interface.
The registry information will show a default Comm Port of 2 and a default Comm Speed of 9600. This information should be changed as necessary to reflect the computers Comm Port and the baud rate set by the IOC-7007 baud rate jumpers. The registry entry also displays timeout and delay information. These are advanced parameters that should only be modified by advanced users (see software documentation for more information).
Once the appropriate Registry information has been set, in this case as a DMC-1412, select OK and close the registry window. The user is now able to communicate with the IOC-7007 . Once the entry has been selected, click on the OK button. If the software has successfully established communications with the IOC board, the registry entry will be displayed at the top of the screen.
If the computer is not properly communicating with the board, the program wil l pause for 3-15 seconds. The top of the screen will display the message “Status: not connected with Galil motion controller” and the following error will appear: “STOP - Unable to establish communication with the Galil controller. A time­out occurred while waiting for a response from the Galil controller.” If this message appears, click OK. In this case, there is most likely an incorrect setting of the serial communications port. The user must ensure that the correct communication port and baud rate are specified when attempting to communicate with the board. The user must insure that the proper serial cable is being used (see page cable).
Once communications have been established, click on Terminal found under the main menu, and a colon prompt should appear. Communicating with the IOC board is described in later sections.
15 for pin-out of serial
Using Galil Software for Windows 98 SE, NT 4.0, 2000, ME, and XP
As in Windows 95 and 98 FE, the IOC-7007 is registered through the Galil Registry in these operating systems. The user can access the Galil registry by selecting “Register Controller…” in the File menu of WSDK or DMC Terminal or just click “Registry” in DMCWIN32. Select the button that says “New Controller” under the Non-PnP Tools and choose IOC-7007 from the pull down menu. Next, select the ‘Serial’ button under the Connection Type and click ‘Next’. The final step is to select the Comm Port being used on the PC and the Comm Speed for data transfer. Hardware handshaking will be selected by default. Select ‘Next’, and the controller will be entered into the registry. Connect to the controller by selecting the Terminal utility and choosing the controller from the registry list.
8 Chapter 2 Getting Started IOC-7007
Fig. 2-3 – Configuring Serial Parameters
Note: Be sure to configure the controller for the specified Comm Speed with the necessary jumper settings.
Using Non-Galil Communication Software
The IOC-7007 serial port is configured as DATASET. The computer or terminal must be configured as a DATATERM for full duplex, no parity, 8 data bits, one start bit and one stop bit.
Check to insure that the baud rate switches (jumpers) have been set to the desired baud rate as described above. Also, the hardware handshake lines (RTS/CTS) need to be in the correct state to communicate. See Chapter 3 for more information on ‘Handshake Modes.’
The computer needs to be configured as a "dumb" terminal, which sends ASCII characters as they are typed to the IOC-7007.
Sending Test Commands to the Terminal
After connecting to the computer or terminal, press <carriage return> or the <enter> key on the keyboard. In response to carriage return (CR), the controller responds with a colon, :
Now type TZ (CR) This command directs the IOC to return the current I/O status. The controller should respond with something
similar to the following:
Slot 0 (7-0) = Digital Output – value 0 (0000_000 0 ) Slot 1 = I/O module not detected Slot 2 (79-64) = Digital Input – value 65535 (1111_1111_1111_1111) Slot 3 = I/O module not detected Sot 4 (135-128) = Digital Input – value 255 (1111_1 111)
IOC-7007 Chapter 2 Getting Started 9
Slot 5 = I/O module not detected Slot 6 (195-192) = Digital Output – value 0 (0000)
This response shows slots 2 and 4 occupied by input modules, and slots 0 and 6 with outpu t modules.
Communicating through the Ethernet
Connect the IOC-7007 Ethernet port to your computer via a crossover or null modem Ethernet cable, or to a network hub by a straight through Ethernet cable.
Using Galil Software for Windows 95 and 98 FE
The IOC-7007 must be registered in the Windows registry for the host computer to communicate with it. The registry may be accessed via Galil software, such as DTERM.
From DTERM, the registry is accessed under the REGISTRY menu. Use the Add button to add a new entry in the registry. Choose DMC-1415 as the model type and click on the Ethernet tab. Enter the IP address obtained from your system administrator. Select the button corresponding to the UDP or TCP protocol in which to communicate with the IOC-7007. If the IP address has not been already assigned to the board, click on ASSIGN IP ADDRESS.
Fig. 2-4 –Ethernet Parameters for the IOC-7007
ASSIGN IP ADDRESS will check the I/O boards that are linked to the network to see which ones do not have an IP address. The program will then prompt the user to assign the IP address, which has been entered, to the device with the specified serial number. Click on YES to assign it, NO to move to next device, or CANCEL to not save the changes. If there are no devices on the network that do not have an IP address assigned, the program will state this.
When done registering, click on OK. If you do not wish to save the changes, click on CANCEL.
10 Chapter 2 Getting Started IOC-7007
Once the IOC-7007 has been registered, enter the Terminal and select the IOC board again from the list and click on OK. If the software successfully established communications with the board, the registry entry will be displayed at the top of the screen. Type in BN to save the IP address to the non-volatile memory of the board.
NOTE: The IOC board must be registered via an Ethernet connection, using DMC-1415 as the model type.
If the above method is unsuccessful in assigning an IP address to the IOC-7007, the second option is connecting to the IOC serially and using the IA command to assign the IP address. The user can then add an Ethernet IOC to the registry with the specified address, and connect to it by opening the terminal utility. It is possible to add an Ethernet IOC to the registry without assigning the address by simply clicking FINISH in the Ethernet parameters tab instead of clicking ASSIGN IP ADDRESS.
When connecting to an IO C-7007 via Ethernet, the user must be aware of the type of Ethernet cable being used, and the method of communication. To connect the IOC directly to the PC, use a crossover or null­modem Ethernet cable. This type of cable allows for the crossing of signals between the PC and the controller. If instead the connection to the IOC is through a network hub, a straight through cable must be used. Hubs perform the signal crossing function of a null-modem cable. If the wrong cable is used, communication with the controller will not be possible. The LNK led must be illuminated for Ethernet communications to occur.
Note: If the IOC-7007 is connected in a LAN, make sure the assigned IP address is allowed. Also, Galil strongly recommends the IP address selected cannot be accessed across the Gateway. The Gateway is an application that controls communication between an internal network and the outside world. Ask your network administrator for acceptable IP addresses.
Using Galil Software in Windows 98 SE, NT 4.0, 2000, ME, and XP
The IOC-7007 is registered through the Galil Registry in these operating systems. The user can access the Galil registry by selecting “Register Controller…” in the File menu of WSDK or DMC Terminal, or by clicking “Registry” in DMCWIN32. Select the button that says “New Controller” under Non-PnP Tools and choose IOC-7007 from the pull down menu. Click “Ethernet” under “Connection Type”, and the next screen will allow the user to enter an IP address for the device. This is a 4-byte number, each byte separated by periods. The bytes are represented by their decimal equivalents, meaning that the numeric range is between 0 and 255.
Also, select the Ethernet Protocol as either TCP or UDP. Galil recommends TCP because if information is lost during communication, it will be resent using this protocol. UDP is a more efficient protocol, but does not resend lost information. See Chapter 3 for more detailed information on Ethernet and communication protocols.
IOC-7007 Chapter 2 Getting Started 11
Fig. 2-5 – Assigning IP Address
In the Ethernet Parameters window there are 3 options for sending Unsolicited Messages. These include “Use current ‘CF’ Setting”, “Receive Through Second Handle”, and “Receive Through Same Handle”. If “Receive Through Second Handle” is selected, the IOC-7007 will open a second TCP/UDP handle between it and the computer over which unsolicited messages are sent. With DMCTERM, a second thread listens for messages, which provides a faster response when compared to receiving messages through the same handle. If “Receive Through Same Handle” is selected, unsolicited message are sent back through the same handle that the terminal is using. Now DMCTERM must poll to get these messages, which slows the response time. The first option “Use current ‘CF’ setting” is the default setting, and it allows the user to select the method of message transfer with the CF command. Once all the Ethernet parameters are entered, select ‘Assign IP Address’. The software will search for Galil devices that do not have IP addresses. Once the IOC-7007 has been found and the IP address is assigned, select ‘Finish’, and the IOC will be entered in the Galil Registry. Connect to the IOC through the Terminal and be sure to burn in the IP address with the BN command.
Another method of connecting to the IOC-7007 is using the DMCNET utility in the Registry. Select ‘Find Ethernet Controller’ under “Non PnP Tools”, and the DMCNET window will appear and search for all Galil Devices on the network. Once DMCNET is finished searching, the user can highlight the IOC and give it an IP address by selecting the ‘Assign’ button. From there, the user can add it to the Galil registry by selecting the ‘Register’ button.
The ‘Connections…’ button in DMCNET will provide a list of communication handles associated with the IOC-7007. Furthermore, the ‘Free Handles…’ button frees all handles. See Chapter 3 for more information on Ethernet handles.
12 Chapter 2 Getting Started IOC-7007
Fig. 2-6 – DMCNET Utility
If the two methods above are unsuccessful in assigning an IP address to the IOC-7007, the third option is connecting to the IOC serially and using the IA command to assign the IP address. The user can then add an Ethernet IOC to the registry with the specified address, and connect to it by opening the terminal utility. It is possible to add an Ethernet IOC to the registry by simply clicking ‘Finish’ in the Ethernet parameters window (shown above) instead of clicking on ‘Assign IP Address’.
When connecting to an IO C-7007 via Ethernet, the user must be aware of the type of Ethernet cable being used, and the method of communication. To connect the IOC directly to the PC, use a crossover or null­modem Ethernet cable. This type of cable allows for the crossing of signals between the PC and the controller. If instead the connection to the IOC is through a network hub, a straight through cable must be used. Hubs perform the signal crossing function of a null-modem cable. If the wrong cable is used, communication with the controller will not be possible.
Note: If the IOC-7007 is connected in a LAN, make sure the assigned IP address is allowed. Also, Galil strongly recommends the IP address selected cannot be accessed across the Gateway. The Gateway is an application that controls communication between an internal network and the outside world. Ask your network administrator for acceptable IP addresses.
Sending Test Commands to the Terminal:
After the IOC is connected to the computer or terminal, press <carriage ret urn> or the <enter> key on your keyboard. In response to carriage return (CR), the controller responds with a colon, :
Now type TZ (CR)
IOC-7007 Chapter 2 Getting Started 13
This command directs the IOC to return the current I/O status. The controller should respond with something similar to the following.
Slot 0 (7-0) = Digital Output – value 0 (0000_000 0 ) Slot 1 = I/O module not detected Slot 2 (79-64) = Digital Input – value 65535 (1111_1111_1111_1111) Slot 3 = I/O module not detected Sot 4 (135-128) = Digital Input – value 255 (1111_1 111) Slot 5 = I/O module not detected Slot 6 (195-192) = Digital Output – value 0 (0000)
This response shows slots 2 and 4 occupied by input modules, and slots 0 and 6 with outpu t modules.
Step 6. Configure the Distributed Control System
The IOC-7007 can be set up in a distributed control net w ork with other IOCs and DMC-3425 control l e rs . In this setup, all the DMC-3425s and IOCs act as if they were one multi-axis controller. The host computer communicates to only one master controller, and the master coordinates data transfer between the other controllers and IOCs in the network.
The HC command, available on the DMC-3425, is used to automatically configure the various controllers and IOCs in a distributed network. If this command is used, then each IOC must have a jumper corresponding to its address setting in the distributed network. See Step 1. Configure Jumpers for information on these jumper settings. Also, if the automatic configuration is used, then the IOC should not have an IP address assigned to it. When issued by the DMC-3425, the HC command assigns IP addresses automatically to all devices configured for distributed control.
All information pertaining to the HC command and distributed control is covered in detail in the DMC-3425 User Manual.
14 Chapter 2 Getting Started IOC-7007

Chapter 3 Communication

Introduction

The IOC-7007 has one RS-232 port and one Ethernet port. The RS-232 port is the data set, and it is a standard serial link with communication baud rates up to 19.2kbaud. The Ethernet port is an auto-negotiating 10/100Base-T link.

RS232 Port

The IOC board has a single RS232 connection for sending and receiving commands from a PC or other terminal. The pin-outs for the RS232 connection are as follows.
RS232 - Port 1 DATATERM
1 CTS – output 6 CTS – output 2 Transmit Data - output 7 RTS – input 3 Receive Data - input 8 CTS – output 4 RTS – input 9 No connect (Can connect to +5V) 5 Ground
RS-232 Configuration
Configure the PC for 8-bit data, one start-bit, one stop-bit, full duplex and no parity. The baud rate for the RS232 communication can be selected by using the proper jumper configuration on the IOC-7007 according to the table below:

Baud Rate Selection

IOC-7007 Chapter 3 Communication 15
JUMPER SETTINGS BAUD RATE
9600 1200 --
OFF OFF 19200
ON OFF 9600
OFF ON 1200
Handshaking Modes
The RS232 port is configured for hardware handshaking. In this mode, the RTS and CTS lines are used. The CTS line will go high whenever the IOC-7007 is not ready to receive additional characters. The RTS line will inhibit the IOC board from sending additional characters. Note: The RTS line goes high for inhibit. This handshake procedure ensures proper communication especially at higher baud rates.

Ethernet Configuration

Communication Protocols
The Ethernet is a local area network through which information is transferred in units known as packets. Communication protocols are necessary to dictate how these packets are sent and received. The IOC-7007 supports two industry standard protocols, TCP/IP and UDP/IP. The board will automatically respond in the format in which it is contacted.
TCP/IP is a "connection" protocol. The master must be connected to the slave in order to begin communicating. Each packet sent is acknowledged when received. If no acknowledgement is received, the information is assumed lost and is resent.
Unlike TCP/IP, UDP/IP does not require a "connection". This protocol is similar to communicating via RS232. If information is lost, the IOC board does not return a colon or question mark. Because the protocol does not provide for lost information, the sender must re-send the packet.
Although UDP/IP is more efficient and simple, Galil recommends using the TCP/IP protocol. TCP/IP insures that if a packet is lost or destroyed while in transit, it will be resent.
Ethernet communication transfers information in ‘packets’. The packets must be limited to 470 data bytes or less. Larger packets could cause the IOC-7007 to lose communication.
NOTE: In order not to lose information in transit, Galil recommends that the user wait for an acknowledgement of receipt of a packet before sending the next packet.
Addressing
There are three levels of addresses that define Ethernet devices. The first is the Ethernet or hardware address. This is a unique and permanent 6 byte number. No other device will have the same Ethernet address. The IOC-7007 Ethernet address is set by the factory and the last two bytes of the address are the serial number of the board.
16 Chapter 3 Communication IOC-7007
The second level of addressing is the IP address. This is a 32-bit (or 4 byte) number. The IP address is constrained by each local network and must be assigned locally. Assigning an IP address to the IOC board can be done in a number of ways.
The first method is to use the BOOT-P utility via the Ethernet connection (the IOC-7007 must be connected to the network and powered). For a brief explanation of BOOT-P, see the section: Third Party Software
20). Either a BOOT-P server on the internal network or the Galil terminal software may be used. To
(page
use the Galil BOOT-P utility, select the registry in the terminal emulator. NOTE: For Windows 95 and 98 FE, Select the DMC-1415 controller. Once the model type is selected, click on the Ethernet Parameters
tab. Enter the IP address at the prompt and select either TCP/IP or UDP/IP as the protocol. When done, click on the ASSIGN IP ADDRESS. The Galil Terminal Software will respond with a list of all I/O boards and controllers on the network that do not currently have IP addresses. The user selects the board, and the software will assign the specified IP address to it. Then enter the terminal and type in BN to save the IP address to the non-volatile memory.
CAUTION: Be sure that there is only one BOOT-P server running. If your network has DHCP or BOOT-P running, it may automatically assign an IP address to the IOC board upon linking it to the network. In order to ensure that the IP address is correct, please contact your system administrator before connecting the I/O board to the Ethernet network.
The second method for setting an IP address is to send the IA command throug h the IOC-7007 main RS-232 port. The IP address may be entered as a 4 byte number delimited by commas (industry standard uses periods) or a signed 32 bit number (e.g. IA 124,51,29,31 or IA 2083724575). Type in BN to save the IP address to the IOC non-volatile memory. At this point, it is a good practice to do a manual reset on the IOC board before connecting it to the network.
NOTE: Galil strongly recommends that the IP address selected is not one that can be accessed across the Gateway. The Gateway is an application that controls communication between an internal network and the outside world.
The third level of Ethernet addressing is the UDP or TCP port number. The Galil board does not require a specific port number. The port number is established by the client or master each time it connects to the IOC board.
Communicating with Multiple Devices
The IOC-7007 is capable of supporting multiple masters and slaves. The masters may be multiple PCs and motion controllers that send commands to the I/O board. The slaves can be other IOC’s, Galil Ethernet controllers such as the DMC-3425 or DMC-21x0, or I/O devices manufactured by other companies.
NOTE: The term “Master” is equivalent to the Internet “client”. The term “Slave” is equivalent to the Internet “server”.
An Ethernet handle is a communication resource within a device. The IOC-7007 can have a maximum of 6 Ethernet handles open at any time. When using TCP/IP, each master or slave uses an individual Ethernet handle. In UDP/IP, one handle may be used for all the masters, but each slave uses one. (Pings and ARP's do not occupy handles.) If all 6 handles are in use and a 7 packet" that generates the appropriate error in its windows application.
th
master tries to connect, it will be sent a "reset
NOTE: There are a number of ways to reset the board. Hardware reset (push reset button or power down IOC board) and software resets (through Ethernet or RS232 by entering the RS command). The only reset that will not cause the board to disconnect is a software reset via the Ethernet.
IOC-7007 Chapter 3 Communication 17
When the IOC-7007 acts as the master, the IH command is used to assign handles and connect to its slaves. The IP address may be entered as a 4 byte number separated with commas (industry standard uses periods) or as a signed 32 bit number. A port number may also be specified, but if it is not, it will default to 1000. The protocol (TCP/IP or UDP/IP) to use must also be designated at this time. Otherwise, the board will not connect to the slave. (Ex: IHB=151,25,255,9<179>2. This will open handle #2 and conn ect to the IP address 151.25.255.9, port 179, using TCP/IP)
Once the IH command is used to connect to slaves, the user can communicate to these slaves by sending commands to the master IOC-7007. The SA command is used for this purpose, and it has the following syntax.
SAh= "command string" Here "command string" will be sent to handle h. For example, the SA command is the means for sending an
XQ command to a slave/server. A more flexible form of the command is SAh= field1,field2,field3,field4 ... field8 where each field can be a string in quotes or a variable. For example, to send the command KI,5,10 to a DMC-3425 controller; Assume var1=5 and var2=10 and
send the command: SAF= "KI",var1,var2 When the Master/client sends an SA command to a Slave/server, it is possible for the master to determine the
status of the command. The response _IHh4 will return the number 1 to 4. 1 indicates waiting for the acknowledgement from the slave. 2 indicates a colon (command accepted) has been received. 3 indicates a question mark (command rejected) has been received. 4 indicates the command timed out.
If a command generates responses (such as the TE command on a DMC-3425 controller), the values will be stored in _SAh0 thru _SAh7. If a field is unused, its _SA value will be -2^31.
See Chapter 5 for more information on the SA command.
Which devices receive what information from the IOC-7007 depe nds on various things. If a device que ries the IOC board, it will receive the response unless it explicitly tells the IOC board to send it to another device. If the command that generates a response is part of a downloaded program, the response will route to whichever port is specified by the CF command (either a specific Ethernet handle or the RS232 port). If the user wants to send the message to a port other than what is specified by the CF command, add an {Eh} or {S1} to the end of the command (Ex. MG{EC}"Hello" will send the message "Hello" to handle #3 and MG{P1}”Hello” will send it to the serial port).
IOC-7007 Support in Galil’s Distributed network
There are two levels of distributed control supported by the IOC-7007. The first method, as described above, uses the IH command to assign Ethernet handles and connect to slave devices. The other method is a custom Galil architecture in which several DMC-3425 controllers and IOCs act as if they were one multi-axis controller with extend ed I/O. The host computer communicates to only one master controller, and the master coordinates data transfer between the other controllers and IOCs in the network.
The HC command, available on the DMC-3425, is used to automatically configure the various controllers and IOCs in this distributed network. If this command is used, then each IOC must have a jumper corresponding to its address setting in the distributed network. See Chapter 2, Step 2. Configure Jumpers for information on these jumper settings. Also, if the automatic configuration is used, then the IOC should not have an IP address assigned to it. When issued by the DMC-3425, the HC command assigns IP addresses automatically to all devices configured for Galil’s distributed control.
18 Chapter 3 Communication IOC-7007
All information pertaining to the HC command and Galil’s distributed control architecture is covered in detail in the DMC-3425 User Manual.
IOC-7007 as Modbus master
An additional protocol layer is available for speaking to I/O devices. Modbus is an RS-485 protocol that combines information in binary packets that are sent as part of a TCP/IP packet. In this protocol, each slave has a 1-byte slave address. The IOC-7007 assumes a specific slave address is not necessary.
The Modbus protocol has a set of commands called function codes. The IOC-7007 as a Modbus master supports the 10 major function codes:
Function Code Definition 01 Read Coil Status (Read Bits) 02 Read Input Status (Read Bits) 03 Read Holding Registers (Read Words) 04 Read Input Registers (Read Words) 05 Force Single Coil (Write One Bit) 06 Preset Single Register (Write One Word) 07 Read Exception Status (Read Error Code) 15 Force Multiple Coils (Write Multiple Bits) 16 Preset Multiple Registers (Write Words) 17 Report Slave ID
The IOC-7007 provides three levels of Modbus communication. The first level allows the user to create a raw packet and receive raw data. It uses the MBh command with a function code of –1. The format of the command is
MBh = -1,len,array[] where len is the number of bytes, and array[] is the array with the data. The second level incorporates the Modbus structure. This is necessary for sending configuration and special
commands to another device. The formats vary depending on the function code that is called. For more information refer to the MB command in the Command Reference section.
The third level of Modbus communication uses standard Galil commands. Once the slave has been configured, the commands that may be used are @IN[], @AN[], SB, CB, OB, and AO. For example, AO 2020,8.2 would tell I/O number 2020 to output 8.2 Volts.
If a specific slave address is not necessary, the I/O number to be used can be calculated with the following:
I/O Nu mber = (HandleNum*1000) +((Module-1)*4) + (BitNum-1)
where HandleNum is the handle number from 1 (A) to 6 (F). Module is the position of the module in the rack from 1 to 16. BitNum is the I/O point in the module from 1 to 8.
If an explicit slave address is to be used, the equation becomes: I/O Number = (SlaveAddress*10000) + (HandleNum*1000) +((Module-1)*4) + (Bitnum-1) To view an example procedure for communicating with an OPTO-22 rack, refer to the appendix.
IOC-7007 Chapter 3 Communication 19
IOC-7007 as Modbus Slave
Unlike Galil Ethernet controllers, the IOC-7007 can be a ModBus slave as well as a master. Being a slave means that another IOC or Galil Controller can send and receive information from an IOC using all three levels of Modbus communication described above. The port used to communicate to an IOC as a ModBus slave is 502 (use the IH command to set the port number), and the IOC supports function codes 1-7 and 16 as a slave. See the table above for a description of the function codes. If the third level of ModBus communication is used to communicate from a Galil master device to a slave IOC then the I/O number calculation is as follows
I/O Number = (HandleNum*1000) + (BitNum) where the bit number is from 0 to 223. The slave address is not needed. See the beginning of Chapter 4 for the bit number assignments on the IOC-
7007.
Handling Communication Errors
A new automatic subroutine which is identified by the label #TCPERR, has been added. If an IOC-7007 has an application program running and the TCP or UDP communication is lost, the #TCPERR routine will automatically execute. The #TCPERR routine should be ended with the RE command. In the UDP configuration, the QW commands must be active in order for the #TCPERR routine on the master to operate properly.
Multicasting
A multicast may only be used in UDP/IP and is similar to a broadcast (where everyone on the network gets the information) but specific to a group. In other words, all devices within a specified group will receive the information that is sent in a multicast. There can be many multicast groups on a network and are differentiated by their multicast IP address. To communicate with all the devices in a specific multicast group, the information can be sent to the multicast IP address rather than to each individual device IP address. All Galil devices belong to a default multicast address of 239.255.19.56. This multicast IP address can be changed by using the IA>u command.
The Galil Registry has an option to disable the opening of the multicast handle on the IOC-7007. By default this multicast handle will be opened.
Unsolicited Message Handling
Unsolicited messages are internal responses from programs, responses from internal errors and messages from the MG command. There are two software commands that will configure how the controller handles these messages: CW and CF.
The IOC-7007 has 6 Ethernet handles as well as 1 serial port where unsolicited messages may be sent. The CF command is used to configure the controller to send these messages to specific ports. In addition, the Galil Registry has various options for sending this CF command. For more information, see the CF command description in Chapter 5.
The CW command has two data fields that affect unsolicit ed messages. The first field configures the most significant bit (MSB) of the message. A value of 1 will set the MSB of unsolicited messages, while a value of 2 suppresses the MSB. The majority of software programs use a setting of CW2, although the Galil Terminal and WSDK will sometimes set this to CW1 for internal usage. If you have difficulty receiving
20 Chapter 3 Communication IOC-7007
Loading...
+ 147 hidden pages