Torque Meter Frequently Asked Questions
Question number FAQ-1310
TS-2600 RS232C Sample Program
The following is a sample program in QBASIC.
(Example 1) When "RDD" is sent, torque and rotation display data is returned only once.
'**********************************
' TS-2600 DIGITAL TORQUE CONVERTER
' QBASIC sample program
' "RDD" command
'**********************************
'
' RS-232C(COM1) 9600bps, prity:non, 8bit char, 1stop bit, DSR:ignore
OPEN "COM1:9600,N,8,1,DS0" FOR RANDOM AS #1
PRINT #1, "RDD"
INPUT #1, TRQ, REV
PRINT TRQ, REV
END
(Example 2) Pressing "RLO" will cause the displayed torque and rotation data to repeat every second. Pressing "RLF" will stop it.
'**********************************
' TS-2600 DIGITAL TORQUE CONVERTER
' QBASIC sample program
' "RLO" & "RLF" command
'**********************************
'
' RS-232C(COM1) 9600bps, prity:non, 8bit char, 1stop bit, DSR:ignore
OPEN "COM1:9600,N,8,1,DS0" FOR RANDOM AS #1
PRINT #1, "RLO"
DO
INPUT #1, TRQ, REV
PRINT TIME$; " TORQUE="; TRQ; "Nm REVO="; REV; "r/min"
LOOP WHILE INKEY$ = ""
PRINT #1, "RLF"
END
Last updated: 2000-06-09