63
After having loaded the buffer with the data to transmit, activating
the SEND function, which has parameters for the serial port and
the number of characters to transmit, will cause the data to be sent
on the serial line.
During the transmission phase, the bits SM0.6, SM0.7 or SM0.8
relative to the transmission port are set to “1”, while at the end of
the transmission they will be set to “0”. It is possible to control an
eventual reply of a connected device through the control of SM42,
SM43, and SM44, which contain the number of characters
received and saved in the reception buffer of each serial port. Any
writing on any of these special markers causes the emptying of the
buffer data in reception of the corresponding port.
Calls to the SEND function before the end of the preceding
transmission or with free-port mode disabled are ignored by the
program.
7.19 TunePOS and POS functions
The function “TunePOS” executes an auto-tuning procedure,
indispensable for extracting the data of reaction time and axis
inertia for which a positioning procedure is requested.
The function “POS” executes the positioning ON/OFF of the axis.
The functions operate on the variable area VD (double word), the
address of the beginning of the area is requested as a parameter
of the functions “TunePOS” and “POS”. The following table
indicates how the data are organized in the area of the two
functions from the address of the specified location:
Address
area VD
Contents
+0
Count for encoder
+2
Counts for setpoint positioning
+4
Counts for absolute maximum gap of positioning
+6
Time needed to attain max velocity (in decimals of
seconds)
+8
State of the positioning output (0=stationary,
1=forward, 2=backward)