Hello!
I have a cnc under mach3, equipped with optical lines and external DRO. The external DRO has RS232 port and it can send continuously the value of the 3 axis. I'd like to receive this values in mach3, when i push a button, so i can update mach3 DRO with value of external DRO.
For test I try to send data from mach3 to another PC with hyperterminal, and it work correctly using 'call sendsendserial'. I set RS232 proprieties in Config/Logic windows in mach3.
For receiving data i try to use this VB script:
data = "none"
q = 0
while data = "none"
q=q+1
if q=10 then
message "receive error"
exit sub
end if
settimer(1)
while gettimer(1)<0.5
wend
data=getfifoentry()
message data
wend
It must wait about 5 second testing the serial port, then if it doesn't receive data, show error message. I try to send some data to mach3 after script start, but it can't receive anything and after 5 second it show the error message. I think there are some bug in my script but i can't find them... could you help me?
Thank you!