Results 1 to 10 of 15

Thread: Sending serial commands to a GlobalCache

Hybrid View

  1. #1
    Join Date
    Jan 2009
    Location
    Wiltshire
    Posts
    24

    Default Sending serial commands to a GlobalCache

    Hi,

    I have a GlobalCache GC-100 that I wish to send commands to be actioned via one of the serial ports.

    I want to use Girder v5 to do this - I already have it happily sending IR commands.

    I have looked in the admin guide and it states their should be an action:

    9.21.4 Send ASCII Action

    However this action is missing from my Girder install.

    I tried the following in a scripting action but it does not work either:

    local gc = globalcache.New("192.168.1.70")
    gc:WriteData("a11", "4999")

    I know the IP, port and data are correct as they work with the GlobalCache test program.

    Can anyone point me in the direction of what I need to do here to get this working?

    Thanks,

    Rob

  2. #2
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    I think you might be able to use the SimpleSend transport class.

    In the transport manager create a SimpleSend device with IP 192.168.1.70 and port 4999 (for serial port 1)

    Then in a lua action do this:


    Code:
    local txManager = ComponentManager:GetComponentUsingName('Transport Manager')
    local tp = txManager:GetTransportUsingName('My SimpleSend')
    tp:Send("hello!")
    Match the "My SimpleSend" to the name you picked for the transport manager instance.
    Ron
    No support through PM

  3. #3
    Join Date
    Jan 2009
    Location
    Wiltshire
    Posts
    24

    Default Fixed!

    Thanks, this has worked and I am now sending commands via the serial port on my GlobalCache.

    Any idea why I dont see the Send ASCII Action detailed in the userguide?

    Cheers,

    Rob

  4. #4
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    It's been removed. Sorry about the misleading info in the manual. I'll address it.
    Ron
    No support through PM

  5. #5
    Join Date
    Jan 2009
    Location
    Wiltshire
    Posts
    24

    Default Enabling via web server

    Now that I have this working in the Girder console my next stage is to get this running in my web page I am creating.

    I have been using the example here to talk to the global cache:

    http://www.promixis.com/forums/showthread.php?t=20636

    However I am accessing the serial ports in a different way.

    Do you have any examples of how I can get the serial port working via a web page?

    Will I have to create a new simple send transport class in the script in the web page or can I use the one I have already created in Grider?

    Thanks,

    Rob

  6. #6
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,553

    Default

    You can use the class you already have there in fact you can copy and paste that code you have in this thread into a webpage!
    Ron
    No support through PM

Posting Permissions

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