Installation manual
CNC 8055
CNC 8055i
CONCEPTS
7.
SOFT: V02.2X
·409·
Open communication
7.21 Open communication
Open communication lets the CNC communicate with any device through the RS232 serial line
without having to use any particular protocol.
Open communication uses the machine parameters, variables and PLC instructions described next.
Machine parameters for serial line 2
Using open communication requires setting the following parameters for serial line 2:
• BAUDRATE (P0): Communication speed.
• NBITSCHR (P1): Number of data bits per transmitted character.
• PARITY (P2): Type of parity check used.
• STOPBITS (P3): Number of stop bits at the end of each transmitted word.
• PROTOCOL (P4): Type of protocol to be used.
• RCVMAXCAR (P11): Maximum number of characters that may be received.
• RCVENDTI (P12): Indicates the maximum reception time.
Open communication is enabled with parameter PROTOCOL (P4). To enable it, set parameter
PROTOCOL (P4) = 3.
CNC/PLC/DNC variables
There are 2 communication buffers that may be set indistinctively as data input or data output.
These buffers may be accessed with the instructions CNCRD/CNCWR indicating the buffer number
and the position. Each buffer may have up to 255 Bytes and it may be accessed in Byte, Word or
Long mode.
• Access in BYTE mode will be done with COMBUFB.
• Access in WORD mode will be done with COMBUFW.
• Access in LONG mode will be done with COMBUFL.
The accesses to the buffers are defined as: COMBUFB/W/L nBuffer posBuffer.
• nBuffer indicates the buffer number (1 or 2).
• posBuffer gives access de byte indicated inside the buffer.
The first 2 bytes of the buffer indicate the number of bytes to be sent in transmission When receiving,
the first 2 bytes will indicate the number of bytes received.
Example:
() = CNCRD(COMBUFB 1 R3,R4,M1) = CNCWR(R4, COMBUFB 1 8,M1)
It reads from buffer 1 the position BYTE of index R3 leaving the result in R4 and writes it in position
8 of buffer 1.
In direct writing mode, the buffer can also be accessed in Byte/Word/Long mode directly without
having to go through register.
Example:
() = CNCWR($28, COMBUFB 1 4,M1)
Writes the hexadecimal character 28 in the position of the BYTE 4 of buffer 1.
Using open communication requires considering the following variables:
RCVSTAT: Variable that indicates reception status.
RCVCTRL: Variable used to control reception.