Dennis here's a bit of Cubloc basic I have knocked up to give me some idea of status on the Cubloc LCD while I an playing with it and Mach.
It will get more complicated but at the moment I can turn spindleand coolant on & off and alter Overrides no problem
EXCEPT I can't find the bleeding DRO code for the spindle override!! Have these been documeted anywhere?
Wayne
Const Device = CB280
Set Display 2,0,1,50
Cls
Wait 200
Dim coolant As Byte
Dim spincw As Integer
Dim sro As Integer
Dim fro As Integer
Opencom 1,115200,3,80,80
Set Modbus 1,1,20
Usepin 1,Out 'Coolanr
Usepin 2,Out 'Spindle CW
Usepin 3,Out
Input 24
Input 25
Set Ladder On
Do
coolant = _P(1)
spincw = _p(2)
_D(10) = Adin(0) 'Read ADC0 Feedrate overide
fro =_D(10)/10.21
_D(11) = Adin(1)
sro =_D(11)/10.21
Locate 0,0
Print "Coolant ",status(coolant)
Locate 0,1
Print "Spindle ",status(spincw)
Locate 0,2
Print "FRO Pot ",Dp(fro,3),"% fsd"
Locate 0,3
Print "SRO Pot ",Dp(sro,3),"% fsd"
Csroff
Loop
Function status(raw As Byte)As String
If raw = 1 Then
status = "ON "
Else
status = "OFF"
Endif
End Function