The speed information needed to adjust the force feedback
servo gain can be extracted from FS via the utilities that are described on
the motion platform pages: Motion software
III and Interfacing IIBelow gwbasic
program is a modified version of the Rig type 0
program, that extracts the 3 motion parameters and the "RR" speed data from
Ian's BFF motion driver, and sends them to the four D/A converters connected
to the parallel port.
20 ON ERROR GOTO 330
30 CLOSE #1
40 OPEN "com1:4800,n,8" FOR RANDOM AS #1
50 A$=""
55 ON ERROR GOTO 50
60 LINE INPUT#1, A$
65 P$=mid$(A$,5,2)
70 R$=mid$(A$,7,2)
75 H$=mid$(A$,9,2)
77 S$=mid$(A$,11,2) ' extract the groundspeed data from the input hex
string
80 P=INSTR("123456789ABCDEF",right$(P$,1))+16*INSTR("123456789ABCDEF",left$(P$,1))
85 R=INSTR("123456789ABCDEF",right$(R$,1))+16*INSTR("123456789ABCDEF",left$(R$,1))
90 H=INSTR("123456789ABCDEF",right$(H$,1))+16*INSTR("123456789ABCDEF",left$(H$,1))
95 S=INSTR("123456789ABCDEF",right$(S$,1))+16*INSTR("123456789ABCDEF",left$(S$,1))
' convert the hex groundspeed data to decimal value
100 DP=128-P:DR=128-R:DH=128-H
120 DAC1=128+DP+DH
130 DAC2=128-DP+DH-DR
140 DAC3=128-DP+DH+DR
145 DAC4=S ' assign the groundspeed to DAC #4
190 PRINT P;" "R;" "H;" "S;" "DAC1;" "DAC2;" "DAC3;" "DAC4
200 IF DAC1>255 or DAC1<0 then goto 240
210 Out 888,DAC1
220 Out 890,10
230 out 890,11
240 IF DAC2>255 or DAC2<0 then goto 280
250 Out 888,DAC2
260 Out 890,3
270 out 890,11
280 IF DAC3>255 or DAC3<0 then goto 320
290 Out 888,DAC3
300 Out 890,15
310 out 890,11
311 IF DAC4>255 or DAC4<0 then goto 320
312 Out 888,DAC4
313 Out 890,9
314 out 890,11
320 GOTO 50
330 RESUME 20