Download S4516-DF1 PROGRAM DEVELOPMENT MANUAL - Sea
Transcript
SECTION 3 USING THE SYSTEM FUNCTIONS 3.3 TRANSMITTING THROUGH THE USER PORT (sfunc11) The sfunc11 will perform the following functions: • Assemble the message packet by attaching the starting and ending control symbols and inserting additional DLE characters as needed. • Transmit the message packet. • Wait for an acknowledge of receipt of transmission. • Retry the message if the transmission is unsuccessful. • Return with a response indicating the success of the transmission. General Form: sfunc11(#sent,srce); Parameters: #sent: The number of bytes to transmit out the User Port. Variable Types: Constant (1-250), “B” or indirect “*B”. scre: The address where the first byte transmitted is stored. A consecutive number of bytes (= #sent) is transmitted out the USERPORT starting with this address. Variable types: “B” or indirect “*B”. Return Values: 0 = Not Busy, Ready. 1 = Busy. 2 = Done - “DLE ACK” Received. 3 = Done - Error, “DLE NAK” Received. 4 = Done - Error, “DLE ENQ” Time Out. 5 = Done - Error, No Response Time Out. 6 = Done - Error, Packet too Large. Type: Simultaneous. Valid Files: Initialization, Main Program and User Functions. S4516-DF1 Program Development Manual SYSTEMS Electronics Group -15-