Hi Jeff,
 
I´ve added the following to the listing below to "see" if BPD responds
 
..
42 INPUT#2,K
43 IF K<>"#" GOTO 42
44 PRINT K
..
 
After some seconds I see the #, but program then program stucks.
Any further idea about this behaviour?
 
Thanks for your support
Georg
 
Gesendet: Mittwoch, 01. März 2023 um 14:47 Uhr
Von: bir...@soigeneris.com
An: m...@bitchin100.com
Betreff: Re: [M100] BackPack - read data from CLI

You might be sending the SET command before the BPD has time to wake up and respond. It will return a ‘#’ when it wakes up and switches to CLI mode.

 

Jeff Birt

 

From: M100 <m100-boun...@lists.bitchin100.com> On Behalf Of Georg Käter
Sent: Wednesday, March 1, 2023 12:59 AM
To: m...@bitchin100.com
Subject: [M100] BackPack - read data from CLI

 

Hello together,

 

I tried to read "settings" from a BackPack+ with the following, but w/o success

 

10 REM read settings from BackPack/BackPack+
20 REM set variables
21 MAXFILES=2:DEFSTR A-K
22 CP="COM:98N1ENN"
30 REM open COM: for I/O
31 OPEN CP FOR OUTPUT AS 1
32 OPEN CP FOR INPUT AS 2
40 REM turn-on CLI mode
41 PRINT#1,STRING$(4,13)
50 REM send "set" command to BackPack/BackPack+
51 PRINT#1,"set";CHR$(13)
60 REM read data from BackPack (set returns 9? values)
61 INPUT#2,A,B,C,D,E,F,G,H,I
70 REM show "settings"
71 PRINT A,B,C,D,E,F,G,H,I
80 REM turn-off CLI mode
81 PRINT#1,"bye"
99 END

 

What is wrong in the above? Any idea?

 

btw this works:


10 REM read data from BackPack/BackPack+
20 REM set variables
21 MAXFILES=2:DEFSTR A-K
22 CP="COM:98N1ENN"
30 REM open COM: for I/O
31 OPEN CP FOR OUTPUT AS 1
32 OPEN CP FOR INPUT AS 2
40 REM read from BackPack/BackPack+ (Date=A, Time=B, Day=C)
41 PRINT#1,"FF";chr$(7);chr$(13)
42 INPUT#2,A,B,C
50 REM print values
51 PRINT A,B,C
99 END

 

Thanks for your help

Reply via email to