background image

 

 

Examples: 

MBA= ,2,2,12,array[] 

Request  the status of discrete inputs 2-13 (result is stored in array[]) 

MG@IN[1002]   

Requests the status of input 2 (result is transmitted via serial port or  

 

   ethernet) 

 

Packets: 

The command MBA=,2,2,12,array[] results in the following packets being sent, when one RIO is the master, 
and another RIO is the slave, communicating over handle A, port 502(Modbus). Assume digital inputs, in 
descending order from 15-0 are: 0,1,1,1,0,0,1,1,0,0,1,1,0,1,1,1. 

 

Request  

  

Response 

 

Field Name 

(hex) 

Field Name 

(hex) 

Function 02 

Function 

02 

Starting Address High 

00 

Byte Count 

02 

Starting Address Low 

02 

Inputs Status 9-2 

CD 

Quantity of Inputs High 

00 

Inputs Status 13-10 

0C 

Quantity of Inputs Low 

0C 

 

 

 

1

st

 Byte of Response Word 

bit  7 6 5 4 3 2 1 0 

Input 

# 9 8 7 6 5 4 3 2 

Value 1 1 0 0 1 1 0 1 

 

2

nd

 Byte of Response Word 

bit  15 14 13 12 11 10  9  8 

Input 

# X X X X 13 12 11 10 

Value 0 0 0 0 1 1 0 1 

 

Note: bits in the response marked 'X' are not valid input response data, but are instead 0's that fill the 
remainder of the byte. Inputs report back a 0 when active and a 1 when inactive 

On the master RIO, array[0]=205 and array[1]=12 after the MBA= ,2,2,12,array[] command is issued 

20 Chapter 3 Communication 

 

RIO-47xxx

 

Содержание RIO-47120

Страница 1: ...7xxx Manual Rev 1 0j By Galil Motion Control Inc Galil Motion Control Inc 270 Technology Way Rocklin California 95765 Phone 916 626 0101 Fax 916 626 0102 Email support galilmc com URL www galilmc com...

Страница 2: ......

Страница 3: ...7 Using Non Galil Communication Software 7 CHAPTER 3 COMMUNICATION 10 INTRODUCTION 10 RS232 PORT 10 RS 232 Configuration 10 ETHERNET CONFIGURATION 10 Communication Protocols 10 Jumper Configuration f...

Страница 4: ...9 EDITING PROGRAMS 49 PROGRAM FORMAT 49 Using Labels in Programs 50 Special Labels 50 Commenting Programs 50 Program Lines Greater than 40 Characters 51 Lock Program Access using Password 51 EXECUTING...

Страница 5: ...CK 74 APPENDIX 75 ELECTRICAL SPECIFICATIONS 75 Input Output 75 Power Requirements 75 PERFORMANCE SPECIFICATIONS 76 RIO 47xx0 76 RIO 47xx2 76 CERTIFICATIONS 76 ETL 76 CE 76 ROHS 76 STANDARD OPTIONS 77...

Страница 6: ...CONTACTING US 90 TRAINING SEMINARS 91 WARRANTY 92 A1 SCB 48206 93 DESCRIPTION 93 SPECIFICATIONS 94 WIRING 94 OPERATION 94 Method 1 95 Method 2 96 A2 SCB 48306 48316 97 DESCRIPTION 97 SPECIFICATIONS 9...

Страница 7: ...er Galil controllers and it utilizes the same software programs Interrogation commands have been included to allow a user to instantly view the entire I O status I O hardware or Ethernet handle availa...

Страница 8: ...IO DIN 08 15 SOURCE 16 Bit 422 HS 4 20mA PWM RIO 47122 Same as RIO 47120 but with expanded memory DIN 08 15 SOURCE 16 Bit 422 HS 4 20mA RTC PWM QUAD SSI RIO 47200 Same as RIO 47100 except Screw termi...

Страница 9: ...urable There are four status LEDs on the RIO 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 four lights PW...

Страница 10: ...Chapter 2 Getting Started RIO 471xx Figure 1 Outline of RIO 471xx Dimensions listed in the Appendix 4 Chapter 2 Getting Started RIO 47xxx...

Страница 11: ...hernet cable The default configuration is the 18 36VDC power input If PoE is used the four jumpers on JP6 for the RIO 471xx and JP1 for the RIO 472xx must be moved from AUX to PoE Master Reset and Upg...

Страница 12: ...r input or a PoE Power over Ethernet switch there are two possible connection options shown here 1 EXT 18 36VDC power input is the default configuration The four jumpers on JP6 for the RIO 471xx and J...

Страница 13: ...ter or terminal must be configured as a for full duplex no parity 8 data bits one start bit and one stop bit A standard Windows HyperTerminal session can connect to the controller using a straight thr...

Страница 14: ...lock 0 7 0 Inputs value 255 1111_1111 Block 1 15 8 Inputs value 255 1111_1111 Block 0 7 0 Outputs value 0 0000_0000 Block 1 15 8 Outputs value 0 0000_0000 Analog Inputs 7 0 0 0000 0 0000 0 0000 0 0000...

Страница 15: ...standard web browser The controller comes from the factory without any IP address assigned so a user must go through the steps outlined above to establish an IP address before the web server is access...

Страница 16: ...er on J5 The serial port has a 4 bytes FIFO 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 R...

Страница 17: ...last two bytes of the address are the serial number of the board To find the Ethernet MAC address for a RIO unit use the TH command A sample is shown here with a unit that has a serial number of 3 Sam...

Страница 18: ...com sample source address MG Testing Email M Message to send via Email Please contact your system administrator for information regarding email settings Note it is strongly recommended that the email...

Страница 19: ...essage to a port other than what is specified by the CF command add an Eh or P1 to the end of the command Ex MG EB Hello will send the message Hello to handle 2 and MG P1 Hello will send it to the ser...

Страница 20: ...used to check the communication between the device at a specific IP address and the host computer The RIO can communicate with a host computer through any application that can send TCP IP or UDP IP pa...

Страница 21: ...array must contain the entire Modbus packet including transaction identifiers protocol identifiers length field Modbus function code and data specific to that function code 2 Issue the MB command of...

Страница 22: ...on code e g Improper use of function code 01 will result in the exception response 81 An RIO 47xxx configured as a master can query the function code of the last response it received using the _MW com...

Страница 23: ...quest with a starting address ranging from 0000 000F referencing digital outputs 0 15 The RIO will accept a request for up to all 16 of its digital outputs with the quantity of coils ranging from 0001...

Страница 24: ...nse Field Name hex Field Name hex Function 01 Function 01 Starting Address High 00 Byte Count 02 Starting Address Low 02 Outputs Status 9 2 CD Quantity of Outputs High 00 Outputs Status 13 10 0C Quant...

Страница 25: ...IO will accept a read discrete inputs request with a starting address ranging from 0000 000F referencing digital inputs 0 15 The RIO will accept a request for up to all 16 of its digital inputs with a...

Страница 26: ...Name hex Function 02 Function 02 Starting Address High 00 Byte Count 02 Starting Address Low 02 Inputs Status 9 2 CD Quantity of Inputs High 00 Inputs Status 13 10 0C Quantity of Inputs Low 0C 1st By...

Страница 27: ...AN see AN in the command reference Operating as a slave The RIO will accept different starting address ranges for a read holding registers request depending on the state of the MI command If MI is set...

Страница 28: ...Analog Input 5 11 12 Analog Input 6 13 14 Analog Input 7 15 Register Address nalog Input 1 nalog Input 3 nalog Input 5 nalog Input 7 Examples MBA 3 2 4 array Request the status of holding registers 2...

Страница 29: ...eld Name hex Field Name hex volts Field Name hex counts Function 03 Function 03 Function 03 Starting Address High 00 Byte Count 08 Byte Count 08 Starting Address Low 02 RegVal2 High 3F 0 9753 RegVal2...

Страница 30: ...ode 2 MB command with Modbus function code 4 3 AO see AO in the command reference Operating as a slave The RIO will accept different address ranges for a read input registers request depending on the...

Страница 31: ...utput 3 Analog Output 6 7 Analog Output 7 8 Analog Output 4 9 10 AnalogOutput 5 11 12 Analog Output 6 13 14 Analog Output 7 15 Register Address Examples MBA 4 2 4 array Request the status of Registers...

Страница 32: ...x Field Name hex volts Field Name hex counts Function 04 Function 04 Function 04 Starting Address High 00 Byte Count 08 Byte Count 08 Starting Address Low 02 RegVal2 High 3F 1 0000 RegVal2 High 4C 196...

Страница 33: ...be queried with _MW1 Example Normal Response Exception Response _MW results in 05 _MW results in 85 _MW1 contains 01 or 02 Ways to use Function Code 5 with Galil commands 1 MB command in raw packet mo...

Страница 34: ...quest to set digital output 7 high SB1007 Request to set digital output 7 high OB1007 IN 1000 Request to set digital output 7 high if digital output 0 is high Packets The command MBA 5 7 1 results in...

Страница 35: ...xample Normal Response Exception Response _MW results in 06 _MW results in 86 _MW1 contains 01 or 02 Ways to use function code 6 with Galil commands 1 MB command in raw packet mode 2 MB command with M...

Страница 36: ...ts 15 0 to 55AA MBA 6 0 55AA Request to write digital outputs 15 0 to 55AA Note writing digital outputs 15 0 to 55AA results in digital outputs 15 0 in descending order being 0 1 0 1 0 1 0 1 1 0 1 0 1...

Страница 37: ...W1 contains 01 or 02 When using the MB command with Modbus function code 07 response data will be stored in the array referenced in the command line Ways to use function code 7 with Galil commands 1 M...

Страница 38: ...The command MBA 7 array results in the following packets being sent when one RIO is the master and another RIO is the slave communicating over handle A port 502 Modbus Assume digital outputs in descen...

Страница 39: ..._MW1 contains 01 or 02 Ways to use function code 15 with Galil commands 1 MB command in raw packet mode 2 MB command with Modbus function code 15 Operating as a slave The RIO will accept a write mult...

Страница 40: ...to write AA55 to digital outputs 15 0 Packets The command MBA 15 0 16 array when array contains AA55 results in the following packets being sent when one RIO is the master and another RIO is the slave...

Страница 41: ...egisters at a time with function code 16 per the Modbus specification The Modbus transaction results are available with the _MW and _MW1 commands Operating as a slave The RIO will accept different sta...

Страница 42: ...7 15 Register Address Examples For the following example array contains 0 0 0 0 0 15 1 16 0 2 0 4 8 64 160 0 0 64 64 0 0 MBA 1 21 array Request to write 5V to analog output 1 and 3V to analog output...

Страница 43: ...l1 Low 0 The slave RIO will have analog output 1 set to 5V and analog output 2 set to 3V Example 2 The command MBA 16 2 2 array results in the following packets being sent when one RIO is the master a...

Страница 44: ...og Outputs Analog Range Counts Range decimal Counts Range hex 0 5V 0 65520 0x0000 0xFFF0 RIO 47120 12 or 16 bit version Analog Inputs AQx m see command reference for details m Analog Range Counts Rang...

Страница 45: ...4th byte of header UW Sample number UB Error Code UB General Status UW Analog Out Channel 0 counts UW Analog Out Channel 1 counts UW Analog Out Channel 2 counts UW Analog Out Channel 3 counts UW Analo...

Страница 46: ...N A N A N A N A N A N A N A Bytes 2 3 of Header Bytes 2 and 3 make up a word which represents the Number of bytes in the data record including the header Byte 2 is the low byte and byte 3 is the high...

Страница 47: ...ted sourcing power outputs On the RIO 472xx all 16 of the digital outputs are configured this way by default 12 24VDC with 500mA of current capability per output The internal circuit diagram is shown...

Страница 48: ...capability in a sinking configuration Figure 5 Low Power Sinking Outputs OP1B should be connected to the positive side of a 5 24VDC external power supply OP1A should be connected to Ground on the ext...

Страница 49: ...nd is used to read the encoder register the WE command sets the current position of the encoder QUAD only and the SE command configures the encoder when the SSI option is ordered The register that is...

Страница 50: ...ted to the positive side of a DC power supply or to the Ground side of a DC power supply When a device is connected to the digital input current flowing through the opto coupler will cause the input t...

Страница 51: ...Outputs 0 7 on the RIO 4710x are 12 bit analog outputs and have a voltage range of 0 5VDC The outputs can sink or source up to 4mA of current RIO 4712x Analog Outputs 0 7 on the RIO 4712x have a conf...

Страница 52: ...fferential 31k Use the AQ command to specify the analog input range on the RIO 4712x AQ Input Range AQ 0 1 Set input 0 to have 5V input range AQ 1 2 Set input 1 to have 10V input range AQ 2 3 Set inpu...

Страница 53: ...nalog Output Range Note All PID parameters are burnable except PS DB AQ and DQ If you issue a BN with the PID s enabled the default values for PS DB AQ and DQ will be in effect upon power up To unders...

Страница 54: ...input For instance with a 0 5V analog input range such as the RIO 47100 the voltage is normalized to 2 5V This allows the output to go below 2 5 to compensate for a negative error and above 2 5V to c...

Страница 55: ...se the XQ command to execute the program The RIO also has an internal editor that may be used to create and edit programs in the RIOs memory The internal editor is a rudimentary editor and is only rec...

Страница 56: ...abel for incorrect command subroutine TCPERR Ethernet communication error AUTO is a special label for automatic program execution A program which has been saved into the controller non volatile memory...

Страница 57: ...essing b the continuation of message commands MG on multiple lines c Longer IF JP JS conditional statements Note the total length of a multi line command can not exceed 80 characters Lock Program Acce...

Страница 58: ...ead use the instruction HX n where n is the thread number Note that both the XQ and HX commands can be performed from within an executing program For example Instruction Interpretation TASK1 Task1 lab...

Страница 59: ...m of 400 array elements in up to 6 arrays If a single array of 100 elements is defined the command DM will return the value 250 and the command DA will return 5 To list the contents of the variable sp...

Страница 60: ...nning when the interrupt occurs the interrupt subroutine is to be run When the interrupt occurs the specified thread s main program will be paused to allow the interrupt subroutine to be executed Ther...

Страница 61: ...loop program in main thread halted RI0 Return to main program without restoring trippoint but keeping the interrupt enabled ININT2 MG Blinker stops Print message saying blinker effect in thread 1 halt...

Страница 62: ...l for testing events in real time They allow the RIO to make decisions without a host computer Command Format JP and JS Format Description JS destination logical condition Jump to subroutine if logica...

Страница 63: ...atement to be true The operand between any two conditions requires that only one statement be true for the combined statement to be true Note Each condition must be placed in parentheses for proper ev...

Страница 64: ...E command is an optional part of an IF conditional statement and allows for the execution of commands only when the argument of the IF command evaluates False The ELSE command must occur after an IF c...

Страница 65: ...pt was called The ZS1 command clears 1 level of the stack This allows the program sequencer to continue to the next line The ZS0 command resets the stack to its initial value For example if an interru...

Страница 66: ...on line 3 JP DONE _TC 6 Check if out of range MG VALUE OUT OF RANGE Send message MG TRY AGAIN Send message ZS1 Adjust stack JP BEGIN Return to main program DONE End program if other error ZS0 Zero sta...

Страница 67: ...F _TC 1 If error is invalid command TY XQ _ED3 _ED1 1 Skip invalid command ENDIF EN End of command error routine Example Ethernet Communication Error This simple program executes in the RIO and indica...

Страница 68: ...right Calculations within parentheses have precedence Examples SPEED 7 5 V1 2 The variable SPEED is equal to 7 5 multiplied by V1 and divided by 2 COUNT COUNT 2 The variable COUNT is equal to the cur...

Страница 69: ...FLEN Shift FLEN by 32 bits IE convert fraction FLEN to integer LEN1 FLEN 00FF Mask top byte of FLEN and set this value to variable LEN1 LEN2 FLEN FF00 100 Let variable LEN2 top byte of FLEN LEN3 LEN...

Страница 70: ...execution of mathematical expressions is from left to right and can be over ridden by using parentheses Examples V1 ABS V7 The variable V1 is equal to the absolute value of variable V7 V2 5 SIN POS Th...

Страница 71: ...le INTWO INPUT IN 1 Assigns logical value of input 1 to variable INPUT V2 V1 V3 V4 Assigns the value of V1 plus V3 times V4 to the variable V2 Var CAT Assign the string CAT to variable Var Displaying...

Страница 72: ...integer 231 followed by two bytes of fraction 2 147 483 647 9999 Arrays can be used to capture real time data such as the bit status of a particular I O bank Defining Arrays An array is defined with...

Страница 73: ...ed EN End Program The above example records 10 input bit values for bank 0 at a rate of one value per 10 msec The values are stored in an array named INPUT The variable COUNT is used to increment the...

Страница 74: ...fined the number of elements defaults to the smallest array defined by DM When m is a negative number the recording is done continuously in a circular manner _RD is the recording pointer and indicates...

Страница 75: ...input If n is not specified six characters will be accepted For example IN Enter X Y or Z V S specifies a string variable of up to six characters to be input Output of Data Numeric and String Numeric...

Страница 76: ...eturn and the line feed may be suppressed by sending N at the end of the statement This is useful when a text string needs to surround a numeric value Example A FNAME John LNAME Smith MG The name is F...

Страница 77: ...int input status of bank 1 0000000001 0000 Response from Interrogation Command With Leading Zeros LZ1 Enables the LZ function MG IN 0 Print input status of bank 1 1 0000 Response from Interrogation Co...

Страница 78: ...ow describe the commands that are used for I O manipulation and interrogation Digital Outputs The most common method of changing the state of digital outputs is by using the set bit SB and clear bit C...

Страница 79: ...voltage input range is configurable on the RIO 47120 using the AQ command Note When analog input values are accessed from the Data Record or from the Record Array function the returned value will be a...

Страница 80: ...be used to set the analog voltage on ModBus devices over Ethernet Instruction Instruction AO 7 1 5 Set the output voltage on output 7 to 1 5V MG AO 2 Display the analog voltage reading on output 2 Re...

Страница 81: ...s Input Output Digital I O See Chapter 4 DAC Output Current 4mA max output per channel 47120 12V out 10mA max output Power Requirements 18 36 VDC Typical RIO 4710x 1 4W RIO 4712x 2 6W RIO 47200 2 1W M...

Страница 82: ...ombined RIO 47xx2 Variable Range 2 billion Variable Resolution 1 10 4 Variable Size 256 variables Array Size 1000 elements 6 array names Max Program Labels 126 Program Size 400 lines x 40 characters M...

Страница 83: ...ly valid with the RIO 472xx This option removes the din rail clips The unit will still be in a plastic tray Part number ordering example RIO 47200 NO DIN 422 This option allows the RIO to communicate...

Страница 84: ...HSRC 2LSRC 0 7 or 8 15 SINK SOURCE These four options are only available on the RIO 472xx By default the RIO 472xx has all 16 high power outputs These options allow either of the two banks of 8 output...

Страница 85: ...J4 31 Channel 1 A DI12 J4 2 Channel 1 B DI15 J4 1 Channel 1 B DI13 J4 17 Ground N C J4 41 SSI Pinout Encoder Signal Label Connector Pin Channel 0 Clock DO14 J4 24 Channel 0 Clock DO12 J4 39 Channel 0...

Страница 86: ...s available on the RIO 47xxx as a standard option With this option the input becomes a TTL level input that is differential with respect to digital input 2 DI2 is not available as an input with the HS...

Страница 87: ...s the resistor value is 475 ohms An RIO with 10V analog inputs should be configured for 0 10V range AQ n 4 With this setting the range for 4 20mA will be 1 9V 9 5V The equation for calculating the cur...

Страница 88: ...as 10V configurable outputs Maximum current draw is 10mA each When then 0 5V analog outputs are ordered the 12V terminals will be No Connects Part number ordering example RIO 47200 8AO_10v12bit Qty 8...

Страница 89: ...5 43 DO3 Digital Output 3 14 DO1 Digital Output 1 29 DO2 Digital Output 2 44 DO0 Digital Output 0 15 OP0A 12 24V Output Power Supply for DO 0 7 30 OP0A 12 24V Output Power Supply for DO 0 7 Note INC0...

Страница 90: ...Output 5 DI0 Digital Input 0 DO6 Digital Output 6 DI1 Digital Input 1 DO7 Digital Output 7 DI2 Digital Input 2 2 OP1A 12 24V Output Power Supply for DO 8 15 Digital Input 3 2 OP1B DI3 Output Power GR...

Страница 91: ...ved 8 Reserved J5 Power 2 pin Molex Voltage range is 18 36VDC for RIO 471xxx Not used with RIO 47200 This connector is not used when powering the RIO via POE The part number listed below is the connec...

Страница 92: ...ud Rate to 19 2k default without jumper is 115k OPT 10BaseT Ethernet Communication Jumper Label Function If jumpered JP6 AUX 4 jumpers Power for board comes from 2pin Molex Connector 18 36V DC JP7 PoE...

Страница 93: ...RIO Dimensions RIO 471xx Units in centimeters RIO 47xxx Appendix 87...

Страница 94: ...RIO 472xx Units in millimeters 88 Appendix RIO 47xxx...

Страница 95: ...1 for each RIO 471x0 to break out analog signals ICS 48044 M 26 pin D high density Signal Conditioning Board interfaces to up to six RTDs Resistive Temperature Device SCB 48206 26 pin D high density S...

Страница 96: ...b Tal Motion Control Applications by Dr Jacob Tal Motion Control by Microprocessors by Dr Jacob Tal Contacting Us Galil Motion Control 270 Technology Way Rocklin CA 95765 Phone 916 626 0101 Fax 916 62...

Страница 97: ...basic introduction or refresher on how to successfully implement servo motion control systems TIME 4 hours 8 30 am 12 30 pm ADVANCED MOTION CONTROL WHO SHOULD ATTEND Those who consider themselves a s...

Страница 98: ...Control properly packaged and with transportation and insurance prepaid We will reship at our expense only to destinations in the United States Any defect in materials or workmanship determined by Gal...

Страница 99: ...Analog 26 pin high density D sub connector and will use Analog Inputs 0 5 on the RIO for the 6 RTD inputs RTD 0 5 AI 0 5 1 It is oriented vertically from the RIO connector as shown in Figure 12 Other...

Страница 100: ...206 will send a 0 5V analog voltage to the RIO that is related to the resistance of the RTD When using the SBC 48026 the analog inputs should be set to 0 5V inputs for the 6 RTD inputs This is done wi...

Страница 101: ...5 1000 AN 5 21 REM calculate deg C Tc0 r0 100 0 385 Tc1 r1 100 0 385 Tc2 r2 100 0 385 Tc3 r3 100 0 385 Tc4 r4 100 0 385 Tc5 r5 100 0 385 REM calculate deg F not required Tf0 9 Tc0 5 32 Tf1 9 Tc1 5 32...

Страница 102: ...to avoid round off errors in the calculations in the temperature readings MAIN REM set Analog inputs 0 5 to 0 5V inputs AQ 0 3 AQ 1 3 AQ 2 3 AQ 3 3 AQ 4 3 AQ 5 3 AT0 set initial time reference Calc R...

Страница 103: ...Analog 26 pin high density D sub connector and will use Analog inputs 0 5 on the RIO for the 6 thermocouple inputs TC 0 5 AI 0 5 1 It is oriented vertically from the RIO connector as shown in Figure...

Страница 104: ...equired temperatures are outside of listed ranges 2 Voltage Constant will change if Range is modified Wiring The SCB 483x6 has qty 6 thermocouple inputs The thermocouples interfacing to the SCB 483x6...

Страница 105: ...section The equation for calculating Temperature in deg C is Temperature deg C AN 0 5 1000 Voltage Constant Where AN 0 5 Analog input readings for TC 0 5 Voltage Constant Voltage constant for SCB 483x...

Страница 106: ...ine 66 Multitasking 51 Cycle Time Operand Clock 65 Internal Variable 56 64 Debugging 51 Operators Digital Input 63 72 Bit Wise 61 Digital Output 63 71 Output of Data 68 Download 48 66 Program Flow 48...

Страница 107: ...Internal 56 64 Zero Stack 53 RIO 47xxx Index 101...

Отзывы: