201
Mach4 General Discussion / Re: Various Issues I have run across with Mach 4
« on: April 02, 2019, 08:35:43 AM »
Warp9TD confirmed the spindle issue I am seeing is some sort of bug. They are working towards a solution.
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
------------------------
--PLC Script, 50ms --
------------------------
myTorque = servoGetTorque(address)
>>Copy torque data to register to use for on screen bar graph
------------------------
--Screen Load Script --
------------------------
wxTimer function()
>>resume coroutine
end
appendChecksum()
>>appends a checksum to the serial string for transmission
end
coroutineFunction()
>>append checksum to transmission string
>>Transmit String
>>Start Timer, roughly 5ms
>>Yield Coroutine
>>Coroutine resumes here
>>Read serial buffer
>>Check data checkum
>>Return data
end
function servoGetTorque(address)
>>Create transmission string
local state = coroutine.status (DriveComm)
if (state == "dead") then
>>create coroutine, pass in transmission string
end
Return torque data when entire coroutine is finished
end
function DoThis(x)
--stuff here
end
placeholder = coroutine.create(Do this(x))