On most Guidance Controllers, serial communication is supported by two RS-232 serial ports. Some controllers also offer an optional RS-485 serial port that is available for general use when the controller is not embedded in a PreciseFlex robot or connected to a Guidance IO Module (GIO) or Guidance Slave Board (GSB).
If the controller is connected to a Remote IO (RIO) module, one to three additional remote serial ports will be available per RIO. See the Hardware Reference section for your controller for information about connecting to these ports.
If the controller is connected to a version 4 Guidance Slave Board (GSB4), an option is available to connect to an RS232 port on that board. This serial device is accessed by GPL procedures as “/dev/comnN1” where “N” is the node number of the GSB4 board being referenced.
The table below shows the primary serial port configuration parameters with the default values for a new Guidance Controller. This port is used as the serial console port and can also be accessed by GPL procedures as device "/dev/com1".
| Parameter Database ID | Parameter Name | Default Value | Description |
|---|---|---|---|
|
400 |
Baud rate |
9600 |
Specifies the transmission and reception rate of the primary serial communication line. See the Baud Rate Table below for allowable baud rates. |
|
401 |
Bits per character: 7 or 8 |
8 |
Specifies the character size, in bits, for the serial port. Allowed values are 7 or 8. |
|
402 |
Stop bits:1 or 2 |
1 |
Specifies the number of stop bits for the serial port. Allowed values are 1 or 2. |
|
403 |
Parity: 0=None, 1=Odd, 2=Even |
0 |
Specifies the parity for characters on the serial port. Allowed values are: 0 for no parity, 1 for odd parity, 2 for even parity. |
|
404 |
Hardware flow control |
0 |
Specifies if the serial port should use hardware flow control via the RTS/CTS signals. Set to 1 for flow control, 0 for no flow control. NOTE: NOT ALL GUIDANCE CONTROLLERS SUPPORT HARDWARE FLOW CONTROL. |
Normally, the primary serial port is configured to be a command interface that accepts requests and replies with human-readable text. In this mode, it can be connected to an ASCII terminal emulation program such as HyperTerminal for direct operator interaction or may be connected to a host computer that issues commands and listens to replies. See the Console Commands section for a list of the available commands.
Alternatively, the serial port may be configured as a simple communications interface controlled by a GPL procedure. This mode of operation is controlled by the following parameter.
| Parameter Database ID | Parameter Name | Default Value | Description |
|---|---|---|---|
|
125 |
Serial console enable |
TRUE |
If TRUE, the GPL console is enabled on the first serial port, "/dev/com1" at system startup. When set to FALSE, the GPL console stops and the first serial port becomes available for general I/O. When set to TRUE, the GPL console is restarted on the serial port. |
The table below shows the secondary serial port configuration parameters with the default values for a new Guidance Controller. This port is also used as the Hardware Manual Control Pendant (MCP) port and is accessed as GPL device "/dev/com2". For controllers with RS-485 ports that are available for general application communications, these same parameters are used to configure the 4th serial port, "/dev/com4".
For RIO modules, these parameters are utilized for setting the characteristics of the 2nd and 3rd serial ports, "/dev/comrx2" and "/dev/comrx3" (where "x" specifies the RIO number).
When referencing the DataID values in the following table, the parameter's unit specifies the com port: unit = 1 selects /dev/com2, unit = 2 selects /dev/com3, unit = 3 selects /dev/com4 (the RS-485 port). For example, to access the baud rate of the RS-485 port, the DataID specification would be "405,3,0,1".
For remote GSB4 boards, the unit is set to n*100000 + 1. For example, 200001 for node GSB node 2, 800001 for GSB node 8.
| Parameter Database ID | Parameter Name | Default Value | Description |
|---|---|---|---|
|
405 |
Baud rate |
9600 |
Specifies the transmission and reception rate of any additional serial communication lines (/dev/com2, /dev/com3, /dev/com4). Note, the communication port is specified using the "units" field of the parameter specification.
See the Baud Rate Table below for allowable baud rates. |
|
406 |
Bits per character: 7 or 8 |
8 |
Specifies the character size, in bits, for the serial port. Allowed values are 7 or 8. For com4, this value is always 8. |
|
407 |
Stop bits:1 or 2 |
1 |
Specifies the number of stop bits for the serial port. Allowed values are 1 or 2. For com4, this value is always 1. |
|
408 |
Parity: 0=None, 1=Odd, 2=Even |
0 |
Specifies the parity for characters on the serial port. Allowed values are: 0 for no parity, 1 for odd parity, 2 for even parity. For com4, this value is always 0. |
|
409 |
Hardware flow control |
0 |
(NOT SUPPORTED ON GUIDANCE CONTROLLERS) Always set the value to 0 since this port does not have hardware flow control signals. |
If the system is configured to operate the PreciseFlex™ Hardware MCP, the secondary serial port is automatically attached by the MCP driver and is unavailable for use as a general serial port. The following parameter enables and disables the operation of the MCP.
| Parameter Database ID | Parameter Name | Default Value | Description |
|---|---|---|---|
|
630 |
Hardware MCP enabled |
TRUE |
When set TRUE, enables the operation of the PreciseFlex™ Hardware Manual Control Pendant (MCP) via the second serial line. This RS-232 line (/dev/com2) is available via pins in the Remote Front Panel connector. If this parameter is FALSE, this serial port can be accessed by GPL projects for general serial communication. |
If the RS-485 port "/dev/com4" is to be used for general communications, no GSB, SFT or GIO board may be configured. No elements of DataID 151 "Servo network node identifier" may specify GSB, SFT, or GIO.
|
Baud Rate |
com1/com2 |
com4 |
comn1 |
|---|---|---|---|
|
110 |
-0.001 |
0.000 |
0.000 |
|
200 |
0.000 |
0.000 |
0.000 |
|
300 |
0.000 |
0.000 |
0.000 |
|
600 |
0.000 |
0.000 |
0.000 |
|
1200 |
0.000 |
0.000 |
0.000 |
|
1800 |
-0.020 |
-0.005 |
0.000 |
|
2400 |
0.000 |
0.000 |
0.000 |
|
4800 |
0.000 |
0.000 |
0.000 |
|
9600 |
-0.160 |
0.000 |
0.000 |
|
19200 |
0.160 |
0.000 |
0.000 |
|
38400 |
0.160 |
-0.160 |
0.000 |
|
57600 |
0.160 |
0.160 |
0.004 |
|
115200 |
0.160 |
0.160 |
0.008 * |
|
230400 |
0.160 * |
0.160 |
N/A |
|
500000 |
0.000* |
0.000 |
N/A |
|
1000000 |
0.000 * |
0.000 |
N/A |
|
1500000 |
0.000 * |
0.000 |
N/A |
|
3000000 |
0.000 * |
0.000 |
N/A |
|
4000000 |
N/A |
0.000 |
N/A |
|
6000000 |
N/A |
0.000 * |
N/A |
|
* Sustained I/O at these speeds may result in lost data depending on overall system loading. |
|||