QUestion about serout???
Archiver
Posts: 46,084
Hi, i'm look for a little help as to what i'm doing
wrong with serout. I'm using a BS2p24 to communicate
to a betabright sign. According to their info, I need
to start ou by sending:
5 - <NUL> to establish the baud rate
1 - <SOH> for "Start of Header" ascii char
1 - "!" or "?" for code type
1 - "00" sign address
1 - <STX> to "start of text"
1 - "A" to Write TEXT file
1 - HELLO sample text to be displayed
1 - <EOT> End Of Transmission
so it look something like this:
<NUL><NUL><NUL><NUL><NUL><SOH>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
wrong with serout. I'm using a BS2p24 to communicate
to a betabright sign. According to their info, I need
to start ou by sending:
5 - <NUL> to establish the baud rate
1 - <SOH> for "Start of Header" ascii char
1 - "!" or "?" for code type
1 - "00" sign address
1 - <STX> to "start of text"
1 - "A" to Write TEXT file
1 - HELLO sample text to be displayed
1 - <EOT> End Of Transmission
so it look something like this:
<NUL><NUL><NUL><NUL><NUL><SOH>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
Comments
wrong with serout. I'm using a BS2p24 to communicate
to a betabright sign. According to their info, I
need to start ou by sending:
5 - <NUL> to establish the baud rate
1 - <SOH> for "Start of Header" ascii char
1 - "Z" for code type
1 - "00" sign address
1 - <STX> to "start of text"
1 - "A" to Write TEXT file
1 - "A" file label of text
1 - HELLO sample text to be displayed
1 - <EOT> End Of Transmission
so it look something like this(taken from their
protocol in the link below):
<NUL><NUL><NUL><NUL><NUL><SOH>"Z00"<STX>"AAHELLO"<EOT>
my code look like this:
'{$STAMP BS2p}
'{$PBASIC 2.5}
NullCount VAR Nib
MAIN:
DO
SEROUT 1,16624, [noparse][[/noparse]0] 'SEND 5 <NULL> TO SIGN
LOOP UNTIL (NullCount = 5)
SEROUT 1,16624, [noparse][[/noparse]1] 'START OF HEADER CHARACTER
SEROUT 1,16624, [noparse][[/noparse]"Z"]'SIGN TYPE
SEROUT 1,16624, [noparse][[/noparse]"00"] 'SIGN lISTENING ON NETWORK
SEROUT 1,16624, [noparse][[/noparse]2] 'START TEXT CHARACTER
SEROUT 1,16624, [noparse][[/noparse]"AAHELLO"] 'WRITE TEST FILE & FILE
LABEL OF TEST & ACTUAL TEXT
SEROUT 1,16624, [noparse][[/noparse]4] 'END OF TRANSMISSION
so far I haven't been able to program the sign. So I'm
wonder if i am using serout out correctly?
Alpha® Sign Communications Protocol
http://www.ams-i.com/Pages/97088061.htm
Thanks for any help,
Tony
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
If so, you'll need a max232 driver.
Then, you're currently sending 'Inverted' in your
baud-rate -- is that what you want?
--- In basicstamps@yahoogroups.com, not today <dakota_99_64804@y...>
wrote:
>
> Hi, i'm look for a little help as to what i'm doing
> wrong with serout. I'm using a BS2p24 to communicate
> to a betabright sign. According to their info, I
> need to start ou by sending:
>
> 5 - <NUL> to establish the baud rate
> 1 - <SOH> for "Start of Header" ascii char
> 1 - "Z" for code type
> 1 - "00" sign address
> 1 - <STX> to "start of text"
> 1 - "A" to Write TEXT file
> 1 - "A" file label of text
> 1 - HELLO sample text to be displayed
> 1 - <EOT> End Of Transmission
>
> so it look something like this(taken from their
> protocol in the link below):
>
>
> <NUL><NUL><NUL><NUL><NUL><SOH>"Z00"<STX>"AAHELLO"<EOT>
>
> my code look like this:
>
> '{$STAMP BS2p}
> '{$PBASIC 2.5}
>
> NullCount VAR Nib
>
> MAIN:
> DO
> SEROUT 1,16624, [noparse][[/noparse]0] 'SEND 5 <NULL> TO SIGN
> LOOP UNTIL (NullCount = 5)
>
> SEROUT 1,16624, [noparse][[/noparse]1] 'START OF HEADER CHARACTER
> SEROUT 1,16624, [noparse][[/noparse]"Z"]'SIGN TYPE
> SEROUT 1,16624, [noparse][[/noparse]"00"] 'SIGN lISTENING ON NETWORK
> SEROUT 1,16624, [noparse][[/noparse]2] 'START TEXT CHARACTER
> SEROUT 1,16624, [noparse][[/noparse]"AAHELLO"] 'WRITE TEST FILE & FILE
> LABEL OF TEST & ACTUAL TEXT
> SEROUT 1,16624, [noparse][[/noparse]4] 'END OF TRANSMISSION
>
> so far I haven't been able to program the sign. So I'm
> wonder if i am using serout out correctly?
>
> Alpha® Sign Communications Protocol
> http://www.ams-i.com/Pages/97088061.htm
>
>
> Thanks for any help,
> Tony
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> http://photos.yahoo.com/ph/print_splash
Your SEROUT statements seem OK. However, you are not incrementing
NullCount so you never exit the loop sending nulls.
Here's another approach:
'{$STAMP BS2p}
'{$PBASIC 2.5}
NUL CON $00
SOH CON $01
STX CON $02
ETX CON $03
EOT CON $04
SEROUT 1,16624,[noparse][[/noparse]NUL,NUL,NUL,NUL,NUL,SOH,"Z00",STX,"AAHELLO",EOT]
Regards,
Steve
hmmm, that i dont know and will ahve to look into... I
know the sign will work off the PC com port.
As to the second part, I'm trying to do the standard
transmissin frame base on the example given in their
document (4.7.1, page 48, table 34 of the document
linked in earlier email).
<NUL><NUL><NUL><NUL><NUL><SOH>"Z00"<STX>"AAHELLO"<EOT>
According to the documentation, I have to send ascii
value to the sign.
so i'm asuming that would read something like:
Hex:
00 00 00 00 00 01 5A 30 30 02 41 41 48 45 4C 4C 4F 04
Dec:
0 0 0 0 0 1 90 48 48 2 65 65 72 69 76 76 79 4
so guess i am wondering if i am doing the serial out
correctly?
Thanks for help,
Tony
--- Allan Lane <allan.lane@h...> wrote:
> Does the sign want 'REAL' +- 12 volt 232 signals?
> If so, you'll need a max232 driver.
> Then, you're currently sending 'Inverted' in your
> baud-rate -- is that what you want?
>
> --- In basicstamps@yahoogroups.com, not today
> <dakota_99_64804@y...>
> wrote:
> >
> > Hi, i'm look for a little help as to what i'm
> doing
> > wrong with serout. I'm using a BS2p24 to
> communicate
> > to a betabright sign. According to their info, I
> > need to start ou by sending:
> >
> > 5 - <NUL> to establish the baud rate
> > 1 - <SOH> for "Start of Header" ascii char
> > 1 - "Z" for code type
> > 1 - "00" sign address
> > 1 - <STX> to "start of text"
> > 1 - "A" to Write TEXT file
> > 1 - "A" file label of text
> > 1 - HELLO sample text to be displayed
> > 1 - <EOT> End Of Transmission
> >
> > so it look something like this(taken from their
> > protocol in the link below):
> >
> >
> >
>
<NUL><NUL><NUL><NUL><NUL><SOH>"Z00"<STX>"AAHELLO"<EOT>
> >
> > my code look like this:
> >
> > '{$STAMP BS2p}
> > '{$PBASIC 2.5}
> >
> > NullCount VAR Nib
> >
> > MAIN:
> > DO
> > SEROUT 1,16624, [noparse][[/noparse]0] 'SEND 5 <NULL> TO SIGN
> > LOOP UNTIL (NullCount = 5)
> >
> > SEROUT 1,16624, [noparse][[/noparse]1] 'START OF HEADER CHARACTER
> > SEROUT 1,16624, [noparse][[/noparse]"Z"]'SIGN TYPE
> > SEROUT 1,16624, [noparse][[/noparse]"00"] 'SIGN lISTENING ON
> NETWORK
> > SEROUT 1,16624, [noparse][[/noparse]2] 'START TEXT CHARACTER
> > SEROUT 1,16624, [noparse][[/noparse]"AAHELLO"] 'WRITE TEST FILE &
> FILE
> > LABEL OF TEST & ACTUAL TEXT
> > SEROUT 1,16624, [noparse][[/noparse]4] 'END OF TRANSMISSION
> >
> > so far I haven't been able to program the sign. So
> I'm
> > wonder if i am using serout out correctly?
> >
> > Alpha® Sign Communications Protocol
> > http://www.ams-i.com/Pages/97088061.htm
> >
> >
> > Thanks for any help,
> > Tony
> >
> >
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Photos: High-quality 4x6 digital prints for
> 25¢
> > http://photos.yahoo.com/ph/print_splash
>
>
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed.
> Text in the Subject and Body of the message will be
> ignored.
>
> Yahoo! Groups Links
>
>
> basicstamps-unsubscribe@yahoogroups.com
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
go figure i would over looked something...
Thanks again,
Tony
--- S Parkis <parkiss@e...> wrote:
> Tony-
>
> Your SEROUT statements seem OK. However, you are
> not incrementing
> NullCount so you never exit the loop sending nulls.
>
> Here's another approach:
>
> '{$STAMP BS2p}
> '{$PBASIC 2.5}
>
> NUL CON $00
> SOH CON $01
> STX CON $02
> ETX CON $03
> EOT CON $04
>
> SEROUT
>
1,16624,[noparse][[/noparse]NUL,NUL,NUL,NUL,NUL,SOH,"Z00",STX,"AAHELLO",EOT]
>
> Regards,
>
> Steve
>
>
> To UNSUBSCRIBE, just send mail to:
> basicstamps-unsubscribe@yahoogroups.com
> from the same email address that you subscribed.
> Text in the Subject and Body of the message will be
> ignored.
>
> Yahoo! Groups Links
>
>
> basicstamps-unsubscribe@yahoogroups.com
>
>
>
__________________________________
Do you Yahoo!?
Yahoo! Photos: High-quality 4x6 digital prints for 25¢
http://photos.yahoo.com/ph/print_splash
data down properly. The only reasons it might
not work are that you are inverting the data
when you don't need to, or the sign wants
true RS232 signals (meaning it wants a MAX232
in there) and you are sending it 0 to 5 Volts.
OR, the sign wants 7 data bits and you are sending
it 8. The Stamp does 8 Data, No Parity, 1 stop
"8N1", or 7 data, even parity, 1 stop "7E1".
"8N1" is usually correct, especially if you are
sending it those control characters.
--- In basicstamps@yahoogroups.com, not today <dakota_99_64804@y...>
wrote:
> Allen,
>
> hmmm, that i dont know and will ahve to look into... I
> know the sign will work off the PC com port.
>
> As to the second part, I'm trying to do the standard
> transmissin frame base on the example given in their
> document (4.7.1, page 48, table 34 of the document
> linked in earlier email).
>
> <NUL><NUL><NUL><NUL><NUL><SOH>"Z00"<STX>"AAHELLO"<EOT>
>
> According to the documentation, I have to send ascii
> value to the sign.
>
> so i'm asuming that would read something like:
>
> Hex:
> 00 00 00 00 00 01 5A 30 30 02 41 41 48 45 4C 4C 4F 04
>
> Dec:
> 0 0 0 0 0 1 90 48 48 2 65 65 72 69 76 76 79 4
>
> so guess i am wondering if i am doing the serial out
> correctly?
>
> Thanks for help,
> Tony
>
> --- Allan Lane <allan.lane@h...> wrote:
> > Does the sign want 'REAL' +- 12 volt 232 signals?
> > If so, you'll need a max232 driver.
> > Then, you're currently sending 'Inverted' in your
> > baud-rate -- is that what you want?
> >
> > --- In basicstamps@yahoogroups.com, not today
> > <dakota_99_64804@y...>
> > wrote:
> > >
> > > Hi, i'm look for a little help as to what i'm
> > doing
> > > wrong with serout. I'm using a BS2p24 to
> > communicate
> > > to a betabright sign. According to their info, I
> > > need to start ou by sending:
> > >
> > > 5 - <NUL> to establish the baud rate
> > > 1 - <SOH> for "Start of Header" ascii char
> > > 1 - "Z" for code type
> > > 1 - "00" sign address
> > > 1 - <STX> to "start of text"
> > > 1 - "A" to Write TEXT file
> > > 1 - "A" file label of text
> > > 1 - HELLO sample text to be displayed
> > > 1 - <EOT> End Of Transmission
> > >
> > > so it look something like this(taken from their
> > > protocol in the link below):
> > >
> > >
> > >
> >
> <NUL><NUL><NUL><NUL><NUL><SOH>"Z00"<STX>"AAHELLO"<EOT>
> > >
> > > my code look like this:
> > >
> > > '{$STAMP BS2p}
> > > '{$PBASIC 2.5}
> > >
> > > NullCount VAR Nib
> > >
> > > MAIN:
> > > DO
> > > SEROUT 1,16624, [noparse][[/noparse]0] 'SEND 5 <NULL> TO SIGN
> > > LOOP UNTIL (NullCount = 5)
> > >
> > > SEROUT 1,16624, [noparse][[/noparse]1] 'START OF HEADER CHARACTER
> > > SEROUT 1,16624, [noparse][[/noparse]"Z"]'SIGN TYPE
> > > SEROUT 1,16624, [noparse][[/noparse]"00"] 'SIGN lISTENING ON
> > NETWORK
> > > SEROUT 1,16624, [noparse][[/noparse]2] 'START TEXT CHARACTER
> > > SEROUT 1,16624, [noparse][[/noparse]"AAHELLO"] 'WRITE TEST FILE &
> > FILE
> > > LABEL OF TEST & ACTUAL TEXT
> > > SEROUT 1,16624, [noparse][[/noparse]4] 'END OF TRANSMISSION
> > >
> > > so far I haven't been able to program the sign. So
> > I'm
> > > wonder if i am using serout out correctly?
> > >
> > > Alpha® Sign Communications Protocol
> > > http://www.ams-i.com/Pages/97088061.htm
> > >
> > >
> > > Thanks for any help,
> > > Tony
> > >
> > >
> > >
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Photos: High-quality 4x6 digital prints for
> > 25¢
> > > http://photos.yahoo.com/ph/print_splash
> >
> >
> >
> >
> > To UNSUBSCRIBE, just send mail to:
> > basicstamps-unsubscribe@yahoogroups.com
> > from the same email address that you subscribed.
> > Text in the Subject and Body of the message will be
> > ignored.
> >
> > Yahoo! Groups Links
> >
> >
> > basicstamps-unsubscribe@yahoogroups.com
> >
> >
> >
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> Yahoo! Photos: High-quality 4x6 digital prints for 25¢
> http://photos.yahoo.com/ph/print_splash