EasyManua.ls Logo

Omron TJ2-MC64 - PROGRAMMING - Page 194

Omron TJ2-MC64 - PROGRAMMING
362 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
BASIC commands
PROGRAMMING MANUAL 188
Revision 1.0
/i
/i
/i
/i
/i
3.2.267 SGN
/i
3.2.268 SIN
/i
Arguments baud_rate
1200, 2400,4800, 9600,19200, 38400
data_bits
7, 8
stop_bits
1, 2
parity
0 = None; 1 = Odd; 2 = Even.
port_number
See the table below.
port_number value Description
1 RS-232C serial port 1
2 RS-422A/485 serial port 2
mode
Select one of the modes listed in the table below for serial ports 1 and 2.
Mode Description
0 General-purpose communication (no XON/XOFF mechanism)
4 ModbusRTU Slave Protocol (transfer as 16-bit integers)
5 Host Link Slave protocol
6 Host Link Master protocol
7 ModbusRTU Slave Protocol (transfer as 32-bit IEEE floating pointer)
data_config
0 = Transfer of VR memory as Modbus registers.
1 = Transfer of TABLE memory as Modbus register.
comms_timeout
Timeout for ModbusRTU communication (defaults to 4ms).
Example SETCOM(19200, 7, 2, 2, 1, 6)
This sets RS-232C port to 19200 baud rate, 7 data bits, 2 stop bits, even par-
ity for communication as a Host Link Master.
See also N/A
Type Mathematical function
Syntax SGN(expression)
Description The SGN function returns the sign of a number. It returns value 1 for positive
values (including 0) and value -1 for negative values.
Arguments expression
Any valid BASIC expression.
Example >> PRINT SGN(-1.2)
-1.0000
See also N/A
Type Mathematical function
Syntax SIN(expression)
Description The SIN function returns the sine of the expression. Input values are in radi-
ans and may have any value. The result value will be in the range from -1 to
1.
Arguments expression
Any valid BASIC expression.
Example >> PRINT SIN(PI/2)
1.0000
See also N/A

Related product manuals