Home AMX User Forum NetLinx Studio

Devices that only reply with an ACK?

What can I do to provide feedback for a device that only replies with an ACK when a command is received? I haven't dealt with 232 devices like that (usually denon receivers that reply with the string sent, so far). I was thinking about a variable, but should it be something like when I send a string, place it into a buffer, and when an ACK is received, pull the data from the buffer to populate feedback? I'm at a bit of a loss.

Comments

  • ryanwwryanww Posts: 196
    I usually use a function to send the string to the projector. It simultaneously copies it to a 'sent_string' variable so when I get a reply from the device, I compare it with the last string sent to know what to do with it. I have a couple Sharp XG-PG50 projectors that only reply with a number if your asking for the input or lamp hours.
  • vegastechvegastech Posts: 369
    That should work beautifully! Thanks!
  • DHawthorneDHawthorne Posts: 4,584
    Even replying with a single number is better than just an ACK. I tend to treat them like IR devices and do all my tracking in the module depending on what I sent it. I don't concern myself with feedback at all in such cases; I'm not a fan of faking feedback.
  • jweatherjweather Posts: 320
    Don't forget that "ACK" could mean "Received your message, checksum is okay, but I'm going to ignore it because I want to." It doesn't necessarily mean the projector actually did anything in response...
  • ericmedleyericmedley Posts: 4,177
    jweather wrote: »
    Don't forget that "ACK" could mean "Received your message, checksum is okay, but I'm going to ignore it because I want to." It doesn't necessarily mean the projector actually did anything in response...

    I've always thought the choice of the term 'ACK' was a bit of a problem. I know it means 'ACKNOWLEDGE' and all that. But, to me it sounds to much like something choking.

    By the way, I"m with Dave. If it doesn't send me real feedback, it's an IR device in my mind.
  • ericmedley wrote: »
    By the way, I"m with Dave. If it doesn't send me real feedback, it's an IR device in my mind.
    Count me in as 3. Without real feedback Ack doesn't mean Jack (unless you're checking to see if you need to re-send a message).
    --John
  • I tend to cheat, and use the ACK as a pointer to send a status command ( basically instead of a timeline )
    I have found that most devices that only have a ACK respsonse to an action have a dedicated status command, so it tends to work in most cases.

    But add me to voice of dissent for protocol writers that can not be "bothered" it seems to flesh out a proper protocol. Maybe they should be made to implement their own protocols and see how they like it
  • yuriyuri Posts: 861
    A sharp projector replies with "'OK'" when sending power and inputs commands.
    But when asking for lamp or inputs status, it replies with '0', '1' or something else.

    I can imagine this is also true for the device vegastech is controlling, but i could be wrong :)
  • Is there no polling command?

    Usually for those, I use a timeline, to poll once for all the possible things that I am tracking.

    data_event[dvDevice]
    {
    string:
    {
    select
    {
    active(find_string(data.text,"'Ack'",1)):
    {
    timeline_create(TL,TLarray,length_array(tlarray),timeline_absolute,timeline_once)
    }
    }
    }
    }
    timeline_event[TL]
    {
    switch(timeline.sequence)
    case 1:
    {
    send_string dvDevice,"'query1',13"
    }
    Case 2:
    {
    send_string dvDevice,"'query2',13"
    }
    }


    This way everytime you are getting an ACK back from a device you time the controller to go out and check to see what has changed.
  • vegastechvegastech Posts: 369
    Ryan, that is genius. I can poll it, and I actually do, every 30 secs. However, If I add the ack into my data event, "feedback" works even faster! Cool.....................
Sign In or Register to comment.