Shop OBEX P1 Docs P2 Docs Learn Events
16 bit number from VB6 to Stamp/ — Parallax Forums

16 bit number from VB6 to Stamp/

ArchiverArchiver Posts: 46,084
edited 2003-02-18 15:38 in General Discussion
Does anyone have any clues to save me some time in figuring out how to get a
numerical value out of VB6's MSCOMM to a stamp? When using MSCOMM out,
strings seem limited to numerical 255. How can I get a larger number, such
as 36360 into the stamp?

LTNS & TIA,
Chris

Comments

  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 03:04
    One digit at a time...

    Original Message

    > Does anyone have any clues to save me some time in figuring out how to get
    a
    > numerical value out of VB6's MSCOMM to a stamp? When using MSCOMM out,
    > strings seem limited to numerical 255. How can I get a larger number, such
    > as 36360 into the stamp?
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 03:33
    Thanks R,
    I think I can send 8 at a time no problem. >> 8 places will get the high
    byte. Just haven't figure out the low byte yet - it may have to be one at a
    time. Hmmm....9 bytes for a 16 it word? ther has to be a better way.....Hey,
    Doc, are you out there? I'd bet you could do this with your eyes closed...
    In the meanwhile, I think I'll put a stamp & LCD on a carrier board an plug
    it into my ThinkPad. Maybe Ill get this one figured out....It may be more of
    a VB question...

    C


    > One digit at a time...
    >
    >
    Original Message
    >
    > > Does anyone have any clues to save me some time in figuring
    > out how to get
    > a
    > > numerical value out of VB6's MSCOMM to a stamp? When using
    > MSCOMM out,
    > > strings seem limited to numerical 255. How can I get a
    > larger number, such
    > > as 36360 into the stamp?
    >
    >
    >
    >
    > 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.
    >
    >
    > Your use of Yahoo! Groups is subject to
    > http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 03:37
    You have to send the number in bytes. 36360 is actually 8E08 to the stamp.
    When you send it serially it sends 8E and 08 (142 and 8 if you look at it in
    decimal). In VB you have to re-construct the word by shifting 8E left 4 then
    adding 08

    You also have to figure out if you're receiving the LSB or MSB first -
    wouldn't do to shift the 08 and add 8E.

    My 'lectronic Newb site http://members.shaw.ca/pmeloy/
    Original Message
    From: "Chris Loiacono (E-mail)" <chris01@t...>
    To: "Basicstamps Group (E-mail)" <basicstamps@yahoogroups.com>
    Sent: Sunday, February 16, 2003 6:43 PM
    Subject: [noparse][[/noparse]basicstamps] 16 bit number from VB6 to Stamp/


    > Does anyone have any clues to save me some time in figuring out how to get
    a
    > numerical value out of VB6's MSCOMM to a stamp? When using MSCOMM out,
    > strings seem limited to numerical 255. How can I get a larger number, such
    > as 36360 into the stamp?
    >
    > LTNS & TIA,
    > Chris
    >
    >
    >
    > 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.
    >
    >
    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
    >
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 04:02
    Hmmm..
    & I was about to shift right 8 to get one byte, then subtract1 and divide by
    256. Putting the two bytes back together would do the same, wouldn't it?

    >
    > You have to send the number in bytes. 36360 is actually 8E08
    > to the stamp.
    > When you send it serially it sends 8E and 08 (142 and 8 if
    > you look at it in
    > decimal). In VB you have to re-construct the word by shifting
    > 8E left 4 then
    > adding 08
    >
    > You also have to figure out if you're receiving the LSB or MSB first -
    > wouldn't do to shift the 08 and add 8E.
    >
    > > Does anyone have any clues to save me some time in figuring
    > out how to get
    > a
    > > numerical value out of VB6's MSCOMM to a stamp? When using
    > MSCOMM out,
    > > strings seem limited to numerical 255. How can I get a
    > larger number, such
    > > as 36360 into the stamp?
    > >
    > > LTNS & TIA,
    > > Chris
    > >
    > >
    > >
    > > 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.
    > >
    > >
    > > Your use of Yahoo! Groups is subject to
    http://docs.yahoo.com/info/terms/
    >
    >


    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.


    Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 04:26
    I wrote an article for my Nuts & Volts column about doing this. You can find
    the article (#89 ) at this link:

    <A
    HREF="http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Download\
    s_V3.asp
    ">
    http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Downloads_V3.

    asp</A>


    -- Jon Williams
    -- Parallax


    In a message dated 2/16/2003 8:44:38 PM Central Standard Time,
    chris01@t... writes:

    > Does anyone have any clues to save me some time in figuring out how to get a
    > numerical value out of VB6's MSCOMM to a stamp? When using MSCOMM out,
    > strings seem limited to numerical 255. How can I get a larger number, such
    > as 36360 into the stamp?
    >
    > LTNS &TIA,
    > Chris
    >



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 21:23
    Jon,

    Thanks. This link is not live any longer - I will check to see if I have the
    magazine here.
    Do you know if the content of this link has been removed or just moved?

    Thanks again, Chris


    > I wrote an article for my Nuts & Volts column about doing
    > this. You can find
    > the article (#89 ) at this link:
    >
    > <A
    > HREF="http://www.parallax.com/html_pages/resources/nvcolumns/N
    > uts_Volts_Downloads_V3.asp">
    > http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Vo
    > lts_Downloads_V3.
    >
    > asp</A>
    >
    >
    > -- Jon Williams
    > -- Parallax
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 21:37
    Jon,

    Thanks. This link is not live any longer - I will check to see if I have the
    magazine here.
    Do you know if the content of this link has been removed or just moved?

    Thanks again, Chris


    > I wrote an article for my Nuts & Volts column about doing
    > this. You can find
    > the article (#89 ) at this link:
    >
    > <A
    > HREF="http://www.parallax.com/html_pages/resources/nvcolumns/N
    > uts_Volts_Downloads_V3.asp">
    > http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Vo
    > lts_Downloads_V3.
    >
    > asp</A>
    >
    >
    > -- Jon Williams
    > -- Parallax
    >
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 21:42
    Works for me -- just had to cut and paste two pieces of the URL together due
    to word-wrap chopping them off.

    http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Downloads_
    V3.asp

    http://www.parallax.com/Downloads/Documentation/nv/v3/col/NV89-Data_Exchange
    _with_Visual_BASIC.pdf



    Original Message

    > Thanks. This link is not live any longer - I will check to see if I have
    the
    > magazine here.
    > Do you know if the content of this link has been removed or just moved?

    > > I wrote an article for my Nuts & Volts column about doing
    > > this. You can find
    > > the article (#89 ) at this link:
    > >
    > > <A
    > > HREF="http://www.parallax.com/html_pages/resources/nvcolumns/N
    > > uts_Volts_Downloads_V3.asp">
    > > http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Vo
    > > lts_Downloads_V3.
    > >
    > > asp</A>
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 21:54
    At 04:37 PM 2/17/03 -0500, Chris Loiacono \(E-mail\) wrote:

    >Thanks. This link is not live any longer - I will check to see if I have the
    >magazine here.
    >Do you know if the content of this link has been removed or just moved?

    The 2nd link certainly works - I just tried it after fixing up the wrap
    problems.

    BTW - enclosing links within angle brackets seems to help with the wrap
    problems:
    <http://www.parallax.com/html_pages/resources/nvcolumns/Nuts_Volts_Downloads_V3.\
    asp
    >

    dwayne

    --
    Dwayne Reid <dwayner@p...>
    Trinity Electronics Systems Ltd Edmonton, AB, CANADA
    (780) 489-3199 voice (780) 487-6397 fax

    Celebrating 19 years of Engineering Innovation (1984 - 2003)
    .-. .-. .-. .-. .-. .-. .-. .-. .-. .-
    `-' `-' `-' `-' `-' `-' `-' `-' `-'
    Do NOT send unsolicited commercial email to this email address.
    This message neither grants consent to receive unsolicited
    commercial email nor is intended to solicit commercial email.
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-17 22:03
    Not for me - no word wrap prob. Even took off the "." at the end of the url.
    Got a 404 msg from the parallax server - 'file not found' Hmmm....
    NTW, though, I found the article in the Sept '02 issue.
    Imagine that - ink on paper....still works.
    Thanks,
    C
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-18 00:08
    Hmmm ... I pasted the link from my browser. Go to the Parallax web site,
    select the Resources menu, then click "Nuts & Volts Columns" and then select
    Volume 3. You'll find a links to each column and code file.

    -- Jon Williams
    -- Parallax

    In a message dated 2/17/2003 4:03:46 PM Central Standard Time,
    chris01@t... writes:

    > Not for me - no word wrap prob. Even took off the "." at the end of the url.
    > Got a 404 msg from the parallax server - 'file not found' Hmmm....
    > NTW, though, I found the article in the Sept '02 issue.
    > Imagine that - ink on paper....still works.
    > Thanks,
    > C



    [noparse][[/noparse]Non-text portions of this message have been removed]
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-18 15:00
    tks, Jon. I have it now.

    VB6 is rejecting characters from your code snippet though.
    Particulaly the underscore - debug function says that it is an
    'unrecognizable character'..

    any further insight? What version of vb did you use?

    CL
    >
    > Hmmm ... I pasted the link from my browser. Go to the
    > Parallax web site,
    > select the Resources menu, then click "Nuts & Volts Columns"
    > and then select
    > Volume 3. You'll find a links to each column and code file.
    >
    > -- Jon Williams
    > -- Parallax
    >
    > In a message dated 2/17/2003 4:03:46 PM Central Standard Time,
    > chris01@t... writes:
    >
    > > Not for me - no word wrap prob. Even took off the "." at
    > the end of the url.
    > > Got a 404 msg from the parallax server - 'file not found' Hmmm....
    > > NTW, though, I found the article in the Sept '02 issue.
    > > Imagine that - ink on paper....still works.
    > > Thanks,
    > > C
  • ArchiverArchiver Posts: 46,084
    edited 2003-02-18 15:38
    I used VB6 Pro. Remember, that project uses flow-control and dedicated
    serial lines.

    -- Jon Williams

    In a message dated 2/18/2003 9:00:39 AM Central Standard Time,
    chris01@t... writes:

    > tks, Jon. I have it now.
    >
    > VB6 is rejecting characters from your code snippet though.
    > Particulaly the underscore - debug function says that it is an
    > 'unrecognizable character'..
    >
    > any further insight? What version of vb did you use?
    >
    > CL
    >



    [noparse][[/noparse]Non-text portions of this message have been removed]
Sign In or Register to comment.