I'm using KUKA.Sim 4.1.1 and in that I am simulating a "KR 210 2700 extra" robot arm with a KR C4 controller running KSS 8.6.10
I don't currently have access to a real robot right now, but am writing code for someone else with a robot using the simulator.
We will be using the EKI option for socket communication, and since the simulator does not support loading that option, I've mocked all the EKI_ calls
Looking around and on this forum, I've found mention of functions like SWRITE, SREAD, etc for converting from string <-> integer / float
My problem is: KUKA.Sim recognizes and can use SWRITE, but SREAD is not found and does not work when running. Example:
DEFFCT INT string_to_int(input[]:IN)
DECL CHAR input[128]
DECL INT offs = 0
DECL INT output
DECL STATE_T state
SREAD("66", state, offs, "%i", output)
RETURN(output)
ENDFCT
The error I get is "Function Sread("66", state, offs, "%i", output) could not be resolved".
I used "66" because I have another unrelated issue passing input[] in where I get "Unable to cast object of type 'System.String' to type 'KukaRoboter.KrlInterpreter.Memory.IArray'."
I can talk more about that, but my pressing issue is string to integer/float conversion.
Any help would be greatly appreciated,
Thanks