1
Technical support / Serial Comms with LibertyBasic ???
« on: January 20, 2009, 07:26:24 PM »
Has any one tried LibertyBasic to communicate with any type of PLC from trilogi?
Communication seems to only work with Qbasic.
When I use the same code in LibertyBasic PLC does not respond.
Yes i do give some wait time before looking at input.
Yes there is a command send out on the comm port. This is confirmed with other laptop and serial debug software.
So whay does this PLC "T44H-pnp" does not respond to the command chr$(5) or any other? The feedback is suppose to be an echo of what is sent.
Here is the code
[opencom]
open "com1:9600,n,8,1,ds0,cs0,rs" for random as #1
[sendwakeup]
print "com 1 opened."
print #1,chr$(5)
timer 200, [timedown]
wait
[ri]
a$ = input$(#1,1)
print "Feedback is >";a$
close #1
print "file is closed."
end
[timedown]
timer 0
goto [ri]
Communication seems to only work with Qbasic.
When I use the same code in LibertyBasic PLC does not respond.
Yes i do give some wait time before looking at input.
Yes there is a command send out on the comm port. This is confirmed with other laptop and serial debug software.
So whay does this PLC "T44H-pnp" does not respond to the command chr$(5) or any other? The feedback is suppose to be an echo of what is sent.
Here is the code
[opencom]
open "com1:9600,n,8,1,ds0,cs0,rs" for random as #1
[sendwakeup]
print "com 1 opened."
print #1,chr$(5)
timer 200, [timedown]
wait
[ri]
a$ = input$(#1,1)
print "Feedback is >";a$
close #1
print "file is closed."
end
[timedown]
timer 0
goto [ri]