Shop OBEX P1 Docs P2 Docs Learn Events
decimal format of output data in Bs2p — Parallax Forums

decimal format of output data in Bs2p

robert hiltonrobert hilton Posts: 3
edited 2006-09-09 17:50 in BASIC Stamp
BS2p Serout command outputs data in the ASCII format, but I want decimal data format·out of BS2p. Could any one suggest me?

Comments

  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2006-09-06 21:57
    This thread is being moved from the·Completed Forum to the·BASIC Stamp·Forum.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
    csavage@parallax.com
  • Mike GreenMike Green Posts: 23,101
    edited 2006-09-06 22:22
    What do you mean by decimal data format? Can you give some examples of what you want given a variable value in PBasic?
    The SEROUT does have the ability to output decimal integer values using the DEC formatter and PBasic deals natively only with integer values.
  • robert hiltonrobert hilton Posts: 3
    edited 2006-09-08 07:18
    I am using BS2p to send data to Instalert Variable Message sign board(VMS). I am sending data in a format that VMS can understand.I am using SEROUT to send data. In the DEBUG window i could see the data I sent through BS2p,but VMS couldn't respond. Using Comlab software (COM port monitor) I could identify the data coming out of BS2p is ASCII, if other format like Hex,Dec is selected the data is not the same as I sent. But I need to send decimal format data to VMS.
    Are you clear with the scenario? Could any you suggest me?
  • UnsoundcodeUnsoundcode Posts: 1,532
    edited 2006-09-09 17:50
    Robert, It's a little unclear to me what you are trying to do without knowing what terminal commands·your VMS accepts so I am going to make the assumption that you are trying to send the decimal code for an ASCII character. I can see a use for this when you may want to send a control character say for positioning the cursor or clearing the screen. For example :- SEROUT 16,{your baud rate},· [noparse][[/noparse]27,42] will transmit the ESC code followed by an asterisk. When·sending text SEROUT 16,{your baud rate},[noparse][[/noparse]72,69,76,76,79] may work or you may have to send SEROUT 16,{your baud rate}, [noparse][[/noparse]"HELLO"] .



    hope my assumption is somewhere near the mark

    Jeff T.
Sign In or Register to comment.