Home AMX User Forum NetLinx Studio

Sending hex value by Netlinx diagnostic

How can I send Hex code to a device by Diagnostic?
I need to send the string : POWON $0D
Thanks
Alex

Comments

  • Joe HebertJoe Hebert Posts: 2,159
    Using Control A Device:

    Enter the device, port, and system. You can?t use 0 for the system number; you need the actual system number.

    Message Type: String

    String Expressions: checked

    Message to send: ??POWON?,$0D?

    Press Send to Device

    HTH
  • eddymouseeddymouse Posts: 67
    I use Emulate Device ( I wanto to simulate my TV Feedback by Serial port)

    I didn't see
    String Expression: checked

    and It not work. It send "'POWON',$0D" withou translation to hex value.
  • Jimweir192Jimweir192 Posts: 502
    As Jo said use Control a Device, Emulate a Device allows you to pretend to be a touchpanel etc.

    If you want to test strings coming into a RS232 Port the easiest way is to short Pins 2 & 3 on the port and use Control a Device to send the string your expecting to receive.

    I dont think Emulate a Device set to a Serial Port number will work.
  • eddymouseeddymouse Posts: 67
    the problem is to send hex value! If i Emulate a Device with the device port system I receive the correct string.
    But I need to insert into the string the hex value and I can't. Why? How Can I insert hex value?
    thanks.
    alex
  • Joe HebertJoe Hebert Posts: 2,159
    eddymouse wrote: »
    the problem is to send hex value! If i Emulate a Device with the device port system I receive the correct string.
    But I need to insert into the string the hex value and I can't. Why? How Can I insert hex value?
    thanks.
    alex
    I don't understand your question. The example I gave you does have a hex value in the string and Emulate a Device does work. Where's the problem?

    How you interpret the data coming in is up to you. A $0D is the same as 13.
  • eddymouseeddymouse Posts: 67
    In my diagnostics don't works. I see $0D( char $ char 0 char D) and not 13.
    In your example you speak about a 'string expression' to check in. Where is it? I can't find it!
  • avi_daveavi_dave Posts: 62
    in the data_event create a local_var char yadadada[100]
    yadadada = data.text
    look at yadadada in debug to track your feedback, now for the other question like so in control a device after you have filled in DPS example for a device on com 1 and your still using the default settings that came with the box you would do 5001:1:0 tick string expression and notification tab then send:-
    “’POWON’,$0D”
    or
    “’POWON’,13”
    or if you really wanna be technical 
    “’POWON’,itohex(13)”
    
    lol

    P.S.you may wanna open up debug and drop yadadada in there to see what you get back :)
  • Joe HebertJoe Hebert Posts: 2,159
    eddymouse wrote:
    In your example you speak about a 'string expression' to check in. Where is it? I can't find it!
    The checkbox is located on both the Emulate a Device and Control a Device dialog boxes right above the Send to Device button.
  • ericmedleyericmedley Posts: 4,177
    It would look like this...
  • viningvining Posts: 4,368
    ericmedley wrote:
    It would look like this...
    Will that work w/o the double quotes? I've always done the way Joe and avi_dave wrote it.
  • ericmedleyericmedley Posts: 4,177
    vining wrote: »
    ericmedley wrote:

    Will that work w/o the double quotes? I've always done the way Joe and avi_dave wrote it.


    I've found it to. would'nt swear to it in a court of law right now though...
  • eddymouseeddymouse Posts: 67
    I'm searching the checkbox in the Netlinx Diagnostics stand alone program!
    Now I have see it!
    Thanks a lot
    Ciao
    Alessandro
Sign In or Register to comment.