cancel
Showing results for 
Search instead for 
Did you mean: 

Connecting scale to ECC using PCo

janbuchmann
Contributor
0 Kudos

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:

  1. “Get Custom Commands” returns
    • GET_AGENT_STATE
    • START
    • SEND
    • STOP
  2. "Get Parameters" for GET_AGENT_STATE returns an error in SAPgui: “Found no results for selection criteria”. What should the result(s) look like?
  3. "Call Custom Command" SEND with the following
    • Parameter Name 1 MESSAGE
    • Parameter Value 1 SI
    • SQL Data Type 12

This does not return an error in SAPgui, but does not return a value either. The log in PCo shows:

DateTimeProcess NameEvent TypeSourceMessage
09.09.201615:57:47Socket_Agent_ICS469VerboseAgentBaseIsConnected returned TRUE
09.09.201615:57:47Socket_Agent_ICS469VerboseSocketAgentChecking server [ICS469 [10.2.17.85:82]] status
09.09.201615:57:47Socket_Agent_ICS469VerboseAgentBaseconnection check
09.09.201615:57:17Socket_Agent_ICS469VerboseSocketAgentChecking server [ICS469 [10.2.17.85:82]] status
09.09.201615:57:17Socket_Agent_ICS469VerboseAgentBaseIsConnected returned TRUE
09.09.201615:57:17Socket_Agent_ICS469VerboseAgentBaseconnection check
09.09.201615:57:16Socket_Agent_ICS469ErrorSocketAgentException executing SendMessage
09.09.201615:57:16Socket_Agent_ICS469InformationAgentBaseQuery:  <pco:tag xmlns:pco="uri:sap-pco-request"><![CDATA[CALL 'SEND' ( MESSAGE = 'SI' );]]></pco:tag>
09.09.201615:57:16Socket_Agent_ICS469InformationPCoRfcNwServerFunctionHandlerQuery Processing Time: 0 milliseconds
09.09.201615:57:16Socket_Agent_ICS469InformationAgentBaseTag 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

Accepted Solutions (0)

Answers (1)

Answers (1)

pushkar_ranjan
Active Contributor
0 Kudos

For my personal education, Jan.

What is the business scenario that you are trying to enable via this technical solution?

Thank you.

janbuchmann
Contributor
0 Kudos

Hi Pushkar

In my specific scenario, I intend to pull the weighing result of a sample directly into QM results recording. But I could also think of other scenarios, such as recording the case weight of packed finished products.

Hope hat helps?

Regards

Jan