Home AMX User Forum NetLinx Studio

rs232 buffer "Where's the beef"?

I am programming in Axcess. I am receiving data into a buffer sized to 100. I receive a transmission that is 28 bytes long. At least when I look at the debugging window it says length is 28.

However, all I can see is three bytes. I must be doing something wrong. I just want to see all 28 characters, but the debugging window just won't show anything but three??? I made a command that Y = LENGTH_STRING of this buffer. Y shows that it equals 28.

I am at a loss.

Comments

  • TurnipTruckTurnipTruck Posts: 1,485
    Do you know what characters you are expecting?

    Try switching the view to Hex in the debugger window.
  • micodermicoder Posts: 36
    rs-232 one way

    I don't know what I am expecting but there are only 3 bytes in all views. I will need to interpret them once I see them.

    Michael
  • jweatherjweather Posts: 320
    Is one of those bytes $00? Emulate/control a device, notifications, and diagnostics have (or have recently had) issues with displaying strings contain nulls.
  • Have you used OpenAxcess? It does a good jog displaying values for Axcess systems.
  • DHawthorneDHawthorne Posts: 4,584
    jweather wrote: »
    Is one of those bytes $00? Emulate/control a device, notifications, and diagnostics have (or have recently had) issues with displaying strings contain nulls.

    Yup, all terminal and debug outputs will stop displaying on a null. Whatever library they are using for that implements null terminated strings, apparently. I pass all my debug feedback through a routine that converts all non-printable ASCII to a meta format, so that a null comes out as ASCII '<0>'.

    This, of course, precludes using any of the built-in tools. You have to do your own debugging at this point (I just use SEND_STRING 0 and open a terminal window).
  • Joe HebertJoe Hebert Posts: 2,159
    jweather wrote:
    Emulate/control a device, notifications, and diagnostics have (or have recently had) issues with displaying strings contain nulls.
    DHawthorne wrote:
    Yup, all terminal and debug outputs will stop displaying on a null.
    True with one exception; Notifications hasn?t had a problem with nulls. If I want to monitor data (that?s going to include nulls), instead of doing a SEND_STRING 0 I?ll do a SEND_STRING to a virtual device and watch it with Notifications. Works perfectly fine and it has for as long as I can remember but I do wish we had the option to view in all hex instead of the mixed mode of ASCII when it can and hex when it can?t.
  • micodermicoder Posts: 36
    open axcess

    I tried using open axcess and could not find any way to look at the buffer??

    kbeattyAMX wrote: »
    Have you used OpenAxcess? It does a good jog displaying values for Axcess systems.
Sign In or Register to comment.