on 09-09-2016 3:32 PM
Hi folks
I am trying to connect an Ethernet-enabled Mettler Toledo scale using SAP PCo 15.1, but I can’t seem to get this right and need some help.
I have successfully created a socket agent & agent instance following the instructions given in http://scn.sap.com/docs/DOC-61503 and was able to start the agent instance. RFC connection from the SAP system which I had defined as destination was also successful. I tried to execute RPCO_BS_INT_TEST, which lead to error "No Read Access Implemented for Agent". But I then learned (http://scn.sap.com/thread/3501838) that RPCO_BS_INT_TEST is not designed to work for socket agents and I implemented & executed Z_PCO_AGENT_COMMANDS instead, using the following:
This does not return an error in SAPgui, but does not return a value either. The log in PCo shows:
Date | Time | Process Name | Event Type | Source | Message |
09.09.2016 | 15:57:47 | Socket_Agent_ICS469 | Verbose | AgentBase | IsConnected returned TRUE |
09.09.2016 | 15:57:47 | Socket_Agent_ICS469 | Verbose | SocketAgent | Checking server [ICS469 [10.2.17.85:82]] status |
09.09.2016 | 15:57:47 | Socket_Agent_ICS469 | Verbose | AgentBase | connection check |
09.09.2016 | 15:57:17 | Socket_Agent_ICS469 | Verbose | SocketAgent | Checking server [ICS469 [10.2.17.85:82]] status |
09.09.2016 | 15:57:17 | Socket_Agent_ICS469 | Verbose | AgentBase | IsConnected returned TRUE |
09.09.2016 | 15:57:17 | Socket_Agent_ICS469 | Verbose | AgentBase | connection check |
09.09.2016 | 15:57:16 | Socket_Agent_ICS469 | Error | SocketAgent | Exception executing SendMessage |
09.09.2016 | 15:57:16 | Socket_Agent_ICS469 | Information | AgentBase | Query: <pco:tag xmlns:pco="uri:sap-pco-request"><![CDATA[CALL 'SEND' ( MESSAGE = 'SI' );]]></pco:tag> |
09.09.2016 | 15:57:16 | Socket_Agent_ICS469 | Information | PCoRfcNwServerFunctionHandler | Query Processing Time: 0 milliseconds |
09.09.2016 | 15:57:16 | Socket_Agent_ICS469 | Information | AgentBase | Tag Query: CALL 'SEND' ( MESSAGE = 'SI' ); |
With the error being:
"FormatException: Input string was not in a correct format. at System.Number.StringToNumber(String str, NumberStyles options, NumberBuffer& number, NumberFormatInfo info, Boolean parseDecimal) at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info) at System.String.System.IConvertible.ToInt32(IFormatProvider provider) at System.Convert.ToInt32(Object value) at SAP.Manufacturing.Connectivity.SocketAgent.SendMessage(Dictionary`2 inputParams)"
The command I am trying to send should actually be in line with Mettler-Toledo’s SICS and should just return the weighing result. I also used SocketTest to do a basic communication test to and from the scale, which was successful.
What am I missing? Do I have to custom develop a suitable agent (http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/10c5ed65-bcf9-2f10-a995-dce2cad64...)?
Thanks & regards
Jan
For my personal education, Jan.
What is the business scenario that you are trying to enable via this technical solution?
Thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
9 | |
7 | |
3 | |
2 | |
2 | |
2 | |
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.