I am trying to use ServiceProgramCall() to call a procedure passing in 3 parameters one being filled in for a return value. The return parameter returns null every time. I created a program that does exactly the same thing and the parameter is returned correctly. From the documentation the code to make the call seems correct in both cases. I will attach the files used for the test in separate files.
Last edit: Chris Hird 2021-02-12
When calling a 'C' program, the output parameters must be PASS_BY_REFERENCE instead of the default PASS_BY_VALUE. Can you change the output parameter to PASS_BY_REFERENCE to see if that makes a difference?
Hi John, The C Program call works? It is the ServiceProgramCall that does not? I am calling both in the same manner except what is used by the Java Class? I will try to change the ServiceProgramCall to pass by reference (not sure how to do that at the moment as we are pretty new to using JTOpen)
Chris..
From what I can see the following should work.
parameterList[2] = new ProgramParameter(PASS_BY_REFERENCE, 50); That is according to the class definition? But I get an error stating 'PASS_BY_REFERENCE' is not defined?
OK I found the reference and called using:
parameterList[2] = new ProgramParameter(2, 50);
Still nothing returned from the service program call.
Assigning to the toolbox experts. I was just looking for something obvious.
OK Thanks