Hey all,
I would like to send the current DRO values to the serial port, I found that : Call SendSerial (GetOEMDRO(83) & " " & GetOEMDRO(84) & " " & GetOEMDRO(85) & "*") does this with no problem
.
Now I would like to send the values constantly while running a part. I have tried putting it in a while loop with a short sleep but it seems to hang the system. It looks like the sleep is actually causing the problems. Perhaps there is some event based approach I could be using, any ideas? Current script is below:
'Loop endlessly writing the current DRO values to the serial port
'While true
'Write the DRO values
Call writeDROSerial()
'Sleep for a bit so we dont flood the serial port
Sleep(100)
'Wend
'Dump the DRO values out to the serial port with a * as the end line (Not sure how to create a CRLF!!! so a * will do for now)
Sub writeDROSerial()
Call SendSerial (GetOEMDRO(83) & " " & GetOEMDRO(84) & " " & GetOEMDRO(85) & "*")
End Sub