Results 1 to 3 of 3

Thread: RS232 Hex Recieve Problems

  1. #1

    Lightbulb RS232 Hex Recieve Problems

    I'm having trouble getting a response over rs232 from a vision av-1700 amp I'm using for a project

    Commands for controlling the amp work fine, but its meant to send a response back, to get current volume levels back into girder etc..

    I'm connecting to it through a global cache box.

    Connecting:

    if lt134 == nil then
    local SimpleSendReceive = require('examples.simpleSendAndReceive')
    lt134 = SimpleSendReceive.new('6.28.192.34',4999)
    lt134:connect()
    end

    Sending:

    test = math.hextobyte('A51515')
    lt134:send(test)


    using the global cache "iTest" tool
    I can see the response, but I cant seem to find a way to get it into girder

    any advice?

    Click image for larger version. 

Name:	lt134.png 
Views:	148 
Size:	49.2 KB 
ID:	6753

  2. #2

    Default

    Managed to solve the problem
    I had worked out the return string wasn't terminated correctly and after looking over other some other threads (mainly: W800rf32 Transport file ),
    created a new send a receive looking for a length instead of a terminator

    self.connectionarser( Promixis.Transport.IParser.Type.PARSER_LENGTH, 8 )
    instead of
    self.connectionarser( Promixis.Transport.IParser.Type.PARSER_TERMINATED, "\r\n" )

    and changed the onDataRecieved from

    local onDataReceived = function(self, data)
    gir.triggerEvent(data,18)
    print("Received: ", data)
    end

    to
    local onDataReceived = function(self, data)
    gir.triggerEvent(math.binaryToHexString(data),18)
    print("Received: ", math.binaryToHexString(data))
    end

  3. #3
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    Excellent, that was going to be my suggestion. Thanks for posting your fix.
    Ron
    No support through PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •