Rockwell-automation 1746-BAS BASIC LANGUAGE User Manual Page 176

  • Download
  • Add to my manuals
  • Print
  • Page
    / 280
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 175
Publication 1746-RM001A-US-P
12-26 Output Functions
Example
>1 REM EXAMPLE PROGRAM
>100 PUSH 1 : REM TURN ON LED1
>110 PUSH 0 : REM TURN OFF LED2
>120 CALL 112 : REM SET THE LEDS
READY
>RUN
READY
>
CALL 114 – Transmit DF1
Packet
Purpose
Use CALL 114 to transmit the DF1 data packet. This routine has no input
arguments and no output arguments. When CALL 114 is performed, the DF1 data
is posted for the DF1 driver to transmit as a single message packet. If half-duplex
slave operation is selected, the message packet is transmitted the next time an
ENQuiry is received from the DF1 master. If full-duplex operation is selected, the
message packet is transmitted immediately.
Use one or more PRINT#, PH0.#, or PH1.# statements to construct the desired
data in the transmit buffer of port PRT2. After constructing the data in the
transmit buffer, use CALL 114 to initiate transmission of the data inside a DF1
message packet.
Caution must be exercised when building DF1 data packets. If an attempt is made
to transmit five or less bytes of data (minimum is six bytes), the message
ERROR:
DF1 DATA PACKET TO TRANSMIT IS TOO SMALL
is sent to the program port and
the module enters Command mode.
If an attempt is made to place more than 256 bytes of data into the transmit buffer,
the message
ERROR: BUFFER OVERFLOW is sent to the program port and the
module enters Command mode.
The user’s program must wait for one transmission to complete before construction
of another data packet may be performed. Use CALL 115 to check the DF1
transmission status to determine when a transmission is complete.
Syntax
CALL 114
Page view 175
1 2 ... 171 172 173 174 175 176 177 178 179 180 181 ... 279 280

Comments to this Manuals

No comments