Relay Module

Home Forums V-Control General Relay Module

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #7322
    jeremys
    Participant

    I ordered a relay module from Amazon to control a projector screen and I’m having issues getting the received data working, I assumed it was something with the AcK but I must be missing something.

    The relay has very simple commands:
    A11T = Relay 1 Open
    A10T = Relay 2 Close
    A21T = Relay 2 Open
    A20T= Relay 2 Close

    Using Hercules when I send A11T the return is OUT1 ON
    When I send A10T the return is OUT1 OFF

    In V-Control when I sent A11T the Return is OUT1 ON&h0D&h0A

    So I assumed the ACK should be 0D0A but when I use OD0A as the AcK in Hex and set the Timeout to 500 I don’t get any Received data back

    Anyone have any suggestions? Or a suggestion on a tool that shows the RAW serial data being sent back maybe I’m missing something.

    Thank you

    #7332
    Dierk
    Participant

    Yes, the ACK should be 0D0A, because &h0D is the hex representation of 0D. Are you sure you use 0 (zero) and not O (the letter O)?

    #7384
    jeremys
    Participant

    Here is a screen shot of the Device Editor, I have 0D0A in the Ack in Hex box
    Device-Editor

    Here is the results of running my script, Received is blank
    MainWindow

    Attachments:
    #7424
    Dierk
    Participant

    I think you have to add a CR to the scriptresult


    scriptresult = “A”+Relay+State+”T”+chr(13)

    or

    scriptresult = “A”+Relay+State+”T”+chr(13)+chr(10)

    #7451
    jeremys
    Participant

    Tried adding chr(13) and chr(13)+chr(10) and still get no Received data back. The rely fires but not getting any feedback.

    If I reduce the Timeout value to 1 i get the following: TimeoutOUT1 OFF&h0D&h0A

    #7453
    Dierk
    Participant

    That is strange. This says that it’s receiving the Acknowledge, but after the Timeout is fired.
    Have you tried to increase the timeout to, let’s say 1500?

    Another solution could be to leave the Ack In Hex field empty and put a value to Ack Length, let’s say 5.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.