1
Mach4 General Discussion / DRO Modbus Question
« on: January 03, 2018, 03:49:06 PM »
Now for a question for the Gurus:
I am trying to add a DRO to show the actual spindle speed as reported by the VFD. As shown a couple of posts above, I have a modbus register setup (modbus0/actualRPM) that is working, but I need help with the code.
I have a DRO created named 'droTrueSpindle', and have the following code at the end of the PLC script:
What am I doing wrong?
I am trying to add a DRO to show the actual spindle speed as reported by the VFD. As shown a couple of posts above, I have a modbus register setup (modbus0/actualRPM) that is working, but I need help with the code.
I have a DRO created named 'droTrueSpindle', and have the following code at the end of the PLC script:
Code: [Select]
local vfdspeed=mc.mcRegGetHandle(inst,"modbus0/actualRPM");
scr.SetProperty('droTrueSpindle','Value',tostring(vfdspeed));
What am I doing wrong?