<< Click to Display Table of Contents > 

SAMLight Manual > Motion Control Settings > Other motion controller > Type 9 - Generic RS-232 interface

Type 9 - Generic RS-232 interface
Previous pageReturn to chapter overviewNext page

This special interface can be used to access devices by sending plain strings to them via RS-232. Controlling the connected device is done exclusively by sending RS-232 strings. There is no axis enabled within the motion control property pane. To configure the generic RS-232 interface:

Set 'Type=9' in sc_motion_settings.txt in <SCAPS>\system\.

Define sc_motion_generic232_settings.txt in <SCAPS>\system\ as described below.

oThis file is a plain text file that contains different configuration parameters.

oA line which begins with a # sign is interpreted as a comment and will be ignored.

oAll parameters have to start exactly at the beginning of a line.

oA parameter is defined by typing <parameter>=<value>, parameter and values are described below, e.g. 'PortName=COM1' defines the parameter 'PortName' with the value 'COM1'.

 

PortName

Defines the RS-232 COM port.

Value

Function

COM#

COM port of the PC where # is the port number (e.g. 'COM1'). # must be in the range of [1, 9].

USC-1

Uses the RS-232 interface of the USC 37-pin connector.

 

PortBaudRate

Sets the data rate.

Unit: [Bd] (bit/s)

 

PortByteSize

Sets the number of data bits.

Defines how many bits are transmitted per character.

 

PortParity

Sets the parity mode.

Value

Function

0

No parity

1

Odd parity

2

Even parity

3

Mark parity

4

Space parity

 

PortStopbits

Sets the number of stop bits.

The following values are supported: 1, 1.5, 2.

 

SendEolValue

Use a custom ASCII end character EolValue.

Value

Function

0

End character is carriage return and line feed.

1

End character is EolValue.

 

EolValue

Specify custom end of line control character

The value must be the ASCII character in decimal representation and in the range of [0, 255]. For example '13' is carriage return. SendEolValue must be '1' to use this end character.

 

TimeOut

Sets a timeout for sending the string.

Unit: [s]. If sending takes longer than the timeout, it is aborted.

 

Debug

Enables debug mode.

Value

Function

0

Disables debug mode.

1

Enables debug mode.

Debug log can be found in %SCAPS_SAM%/system/sc_motion_generic232_debuglog.txt.

There can be huge amounts of data that are logged into such a file so enable this option only if it is necessary.

 

ival

Sends initialization on SAMLight startup.

On startup of SAMLight the motion controller can be initialized with this parameter. This parameter can exist more than once and will be executed in the same order as they appear in the settings file.

 

Example sc_motion_generic232_settings.txt file:

PortName=COM1

PortBaudRate=9600

PortByteSize=8

PortParity=0

PortStopbits=1

SendEolValue=0

EolValue=13

TimeOut=10

Debug=0