API No ack recieved.
hi,
i am using a program based on sending part of API_Base.bs2. I was wondering what would be a good way ot the the BS2 to resend the data if no ack is received (ie the receiver is temporarily off).
I currently have:
GetFrame:
IF XBdata(0) = $7E THEN ' Check for start delimiter
GOSUB ParseData
ELSEIF XBdata(0) <> $7E THEN
GOSUB package 'go to resend data
ENDIF
RETURN
But that just messes things up.
Any ideas or hints are appreciated
Si
Edit: It works without the IF and when the receiver is on
i am using a program based on sending part of API_Base.bs2. I was wondering what would be a good way ot the the BS2 to resend the data if no ack is received (ie the receiver is temporarily off).
I currently have:
GetFrame:
IF XBdata(0) = $7E THEN ' Check for start delimiter
GOSUB ParseData
ELSEIF XBdata(0) <> $7E THEN
GOSUB package 'go to resend data
ENDIF
RETURN
But that just messes things up.
Any ideas or hints are appreciated
Si
Edit: It works without the IF and when the receiver is on

Comments
package: tmo: GOSUB clearXBdata XBdata(0)= XBDelim XBdata(1)= 0 XBdata(2)= 11 XBdata(3)= XBTx16 XBdata(4)= XBFrame XBdata(5)= 0 XBdata(6)= 1 XBdata(7)= 0 XBdata(8)= ( tC2 DIG 0) + "0" XBdata(9)= ( tC2 DIG 1) + "0" XBdata(10)= ( tC2 DIG 2) + "0" XBdata(11)= ( rhTrue DIG 0) + "0" XBdata(12)= ( rhTrue DIG 1) + "0" XBdata(13)= ( rhTrue DIG 2) + "0" XBdata(14) = $FF ' Checksum start value FOR idx = 3 TO 13 ' Calculate checksum XBdata(14) = XBdata(14) - XBdata(idx) NEXT FOR idx = 0 TO 14 ' Show data frame DEBUG HEX2 XBdata(Idx), " " NEXT DEBUG CR FOR idx = 0 TO 14 ' Send data frame SEROUT Tx,Baud,[XBData(Idx)] NEXT GOSUB clearXBdata SERIN Rx\RTS,Baud,500,tmo,[WAIT (XBdelim), STR XBdata\14] FOR idx = 0 TO 14 ' Show data frame DEBUG HEX2 XBdata(Idx), " " NEXT DEBUG CR GOSUB getframe RETURNDO
...
SERIN...
IF XBDATA(3) = $89 THEN EXIT
...
LOOP