In attempting to troubleshoot the attached program error on a Fairino cobot controller I noticed that the existing Fairino post uses a different command syntax than the most recent (V3.9.7, updated 6/25/2026) Lua script manual as found here: https://fairino-doc-en.readthedocs.io/la...intro.html
Specifically, SetToolCoord and SetWObjCoord are not referenced in the new manual, and while these commands are referenced by prior versions of the Lua manual, the function structure does not appear to match either.
Would you mind verifying if the Fairino (not Fairino db) post processor needs updating, and if this might be the source of my error? Thanks very much.
Could you share a few example programs that actually work on your setup and this program generated by RoboDK that pops the error; along with your RoboDK station file. Let me verify and update the post as required.
in case this is still relevant, which i think, because we purchased RoboDK end of july 2026 and i encountered the problem with the SetToolCord() and SetWObjCord().
The problem is the following:
The first argument of SetToolCord() and SetWObjCord() is the internal reference to which ToolCord or WorkObjectCord should be modified.
The Fairino controller FRC-100-AC, which i have, does not let you change these. These two positions are reserved and can't be changed, nether manually nor via code.
RoboDK always writes something like: SetToolCoord(0,0.000,-77.000,174.630,0.000,0.000,0.000,0,0,0,0) This does not change the toolcoordinatesystem. In the Fairino Webapp the TCP does not change. What works is: SetToolCoord(1,0.000,-77.000,174.630,0.000,0.000,0.000,0,0,0,0) This modifies the the toolcoordinatesystem at the internal position of 1 and when executing the TCP moves to the specified location.
A resulting problem is, that RoboDK always references 0 for the ToolCord and the WObjCord in MoveJ and MoveL. As a result you often get, that positions are not reachable, also you defined the right Cordsystem in RoboDK.
The files i attached are very simple and don't throw any erros. But when executing on the controller you see that it actually moves along two different paths. The two .lua files are in the .zip. I could't upload them directly. You sould be fine by just moveing the index for referencing from 0 to 1.
The tool and coordinate system numbers simply need to be specified explicitly
If the robot's coordinate system is used, the identifier of the coordinate system will be 0
Code:
-- program: P2PointTest()
-- Program generated by RoboDK v6.0.7 for FAIRINO FR5 on 15/09/2026 16:08:35
-- Using nominal kinematics.
-- Setting reference frame:
-- Frame 2: 0.000,0.000,0.000,0.000,0.000,0.000
SetWObjCoord(2,0.000,0.000,0.000,0.000,0.000,0.000,0)
WaitMs(500)
-- Tool 34: 0.000,0.000,200.000,0.000,0.000,0.000
SetToolCoord(34,0.000,0.000,200.000,0.000,0.000,0.000,0,0,0,0)
WaitMs(500)
tj1,tj2,tj3,tj4,tj5,tj6=GetInverseKin(0,497.000,-274.038,477.000,-180.000,0.000,-90.000,-1)
MoveL(tj1,tj2,tj3,tj4,tj5,tj6,497.000,-274.038,477.000,-180.000,0.000,-90.000,34,2,30,100,10,-1,0.000,0.000,0.000,0.000,0,0,0,0,0,0,0,0)
tj1,tj2,tj3,tj4,tj5,tj6=GetInverseKin(0,497.000,94.806,477.000,-180.000,0.000,-90.000,-1)
MoveL(tj1,tj2,tj3,tj4,tj5,tj6,497.000,94.806,477.000,-180.000,0.000,-90.000,34,2,30,100,10,-1,0.000,0.000,0.000,0.000,0,0,0,0,0,0,0,0)
-- program end
Thanks for addressing the issue. The proposed solution works for me.
I didn’t include the specific problem in the file I uploaded. I have another station where I added a separate coordinate system. To keep track of the coordinate systems, I renamed them according to their respective tasks. After I renamed them, the postprocessor understandably didn’t update the tool number in the Fairino program, the renamed coordinate system was set as reference for the programm.
For completeness I attach the original file, where the problem occured to me.