on 2015 Jul 16 11:55 AM
Dear Forum,
I have a requirement to connect to a plant PLC using a socket connection in SAP PCO to extract batching weights for produced product. To communicate with the PLC different strings need to be sent to it to get these results back. A typical wake-up string template would be "SYN(16) SYN(16) ENQ(05) ID# ID# EOT(04)" which will return "SYN(16) ACK(06) Status Code EOT(04) CR(0D)". (Hex in brackets)
I have successfully connected to the PLC via the socket agent, but when sending the wake-up string from MII to PCO it results in error:
Message sent - CALL SEND(address='nnn.nn.n.nn', port='7000', message='\16\16\05 0115AF\04');
Error received - Query execution failed due to following:
[Tag] : Exception [TokenizerException] - Token error (Invalid Escape Character), at location 55, expected tokens [String,Double,Long,Time].
rt='7000', message=' \16\16\05 0115AF\04' ^
The question is: How do I escape the control characters in the message to get a successful transmission?
SAP MII version 15.0 SP3 Patch 0
SAP PCO version 2.3 SP4
Request clarification before answering.
Resolved it myself. Control charters should be sent in the following format:
Text string: <16><16><05> 011AF<04>
Hex string:  011AF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.