Page 1 of 3 123 LastLast
Results 1 to 10 of 21

Thread: Arduino Serial string for Girder 6?

  1. #1
    Join Date
    Nov 2002
    Location
    UK
    Posts
    80

    Default Arduino Serial string for Girder 6?

    Chaps,

    After much deliberation, I'm in the process of moving my production system from Girder 5 to 6. One of the main pre-cursors was to move from a "u-HID" interface to an Arduino (pro-micro) for interfacing my switch panels and opto-encoders (allowing the dropping of certain legacy plugins, work-arounds and improving encoder-wheel speeds).

    Only issue, I cannot get the Arduino serial strings to trigger G6. And, after much reading and trial and error; it's time to ask for some advice..

    Using the Simple Send and Receive transport in Girder 5.1, all is working using a simple line in the Arduino sketch (in this case when an encoder is turned clockwise).

    e.g.
    Serial.println("LCW");

    This doesn't work in G6. I do like the new transport settings, and the connection is reliable - going green for connected.

    What have I tried?
    Different COM ports - some connect, some don't (if in use elsewhere).
    Fixed and Terminated Parsing - without feeling 100% about some of the commands I've been sending from Arduino.

    I can of course use the HID keyboard function in the Arduino pro-micro, and send ASCII alphanumerics which is clunky and something I'm trying to move away from.

    What Arduino command for simple event triggering?
    Any suggestions on:
    1) What Arduino serial commands work well?
    2) What setting in G6? (Terminator/fixed length settings)

    Overall, I have about 20 commands to send in serial.

    Girder 6 is certainly the latest and greatest - and looking reliable, but it's also good at making me feel dumb...

    Thanks,


    Tony
    Last edited by tonyG; September 10th, 2015 at 10:16 AM.

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

    Default

    Hey Tony,

    Sorry about that.

    A few things to get this running:

    What are you using in G6 to do this? I assume a copy of SimpleSerialSendAndReceive.lua if so post it here
    What baud rate do you have configured on the arduino side?
    Can you download Putty and use the serial console to see if data is coming in?
    Ron
    No support through PM

  3. #3
    Join Date
    Nov 2002
    Location
    UK
    Posts
    80

    Default

    Thanks Ron for the suggestion of using Putty. It's part of an interesting set of behaviours!

    To explain what I discovered last night, and reviewed this morning. Trying to keep this short:

    Using Serial.println(01); as the Arduino command.
    9600 baud. Com 3.
    Windows 10
    64 bit G6 6.0.11.3

    1) Set up new serial device in "Simple Device Plugin".Arduino RIGHT.zip
    2) Connection goes green, suggesting device connecting. No events. Not working.
    3) Open Putty. Com 3 is in use by another application. Looks like Girder is indeed connected.
    4) In Girder; disable/delete plugin. (Release Com 3)
    5) Reopen Putty Com 3. Data from encoders displayed. Working.
    6) Reopen Girder. Re-enable plugin or create new instance. Works!!

    Put PC to sleep mode and wake up. Still works.
    Close down PC and reboot. Not working. Try edit, disable/renable plugin. Sometimes works. If not working, repeat steps 4-6 (using Putty) works every time.
    Removing arduino USB plug and re-inserting with PC ON also fails, requiring the steps 4-6 as above.

    So, how to describe what is going on? - It looks like Girder connects to the Com port, but doesn't work. Using Putty somehow does something. I would be OK with this if it was a "one-off", but the behaviours described I've been able to repeat many times over.

    Hope you can fathom something from this Ron - let me know if there is anything else you need in terms of info.

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

    Default

    Sounds like a baud rate / parity / bit setting issue. I don't have time this weekend to look at it unfortunately, but I have an idea where the bug might be. Please hang on till Tuesday.
    Ron
    No support through PM

  5. #5
    Join Date
    Nov 2002
    Location
    UK
    Posts
    80

    Default

    No problem. Let me know if you need me to try anything..

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

    Default

    Can you unzip the attached .zip file into the <GIRDERDIR> (make sure it overwrites the existing transport.dll ). Run debugview and try and open your serial device again from Girder. Send me the log from debugview (both if it fails and if it works ).
    Attached Files Attached Files
    Ron
    No support through PM

  7. #7
    Join Date
    Nov 2002
    Location
    UK
    Posts
    80

    Default

    New Transport.dll installed. Have created debugview logs based on 3 sequences:

    1) Loadgirder_com3fails_disabletransport_putty_enable transport_works - essentially the sequence described in post #4 where using Putty fixes the issue.
    2) afterfixworkaround_restartgirder_works - demonstrating that whilst fixed (using steps above), girder can be closed and restarted and things still work.
    3) rebootpc_fails - demonstrating that rebooting PC and restarting girder results in com 3 "connecting", but no events.
    Attached Files Attached Files
    Last edited by tonyG; September 14th, 2015 at 04:34 AM.

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

    Default

    Thanks for that, can you try again with the attached dll, you only need to test the failing case. Catch the log and post it here.
    Attached Files Attached Files
    Last edited by Ron; September 14th, 2015 at 08:01 AM.
    Ron
    No support through PM

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

    Default

    Tony, did you get a chance to try? I've hooked up an arduino and it appeared to work.
    Ron
    No support through PM

  10. #10
    Join Date
    Nov 2002
    Location
    UK
    Posts
    80

    Default

    Hi Ron,
    Sorry for the lack of progress - business trip. Been working on this over the weekend, and still no luck.

    To date, I've done the following:
    1) Tried USB 2.0 ports (have read some issues with Arduinos on USB 3.0)
    2) Updated serial port driver from Windows 10 generic to Sparkfun Pro Micro
    3) Updated Girder 6 to 6.0.12.1 (and testing without and with latest transport.dll)

    Same sequence and behaviours. I'm worried it's working for you with your Arduino - I've tried two Pro-Micros here. It worked with Girder 5.1 although I've now uninstalled this given my upgrade.

    A new log file attached.
    Attached Files Attached Files
    Last edited by tonyG; September 22nd, 2015 at 01:39 PM.

Page 1 of 3 123 LastLast

Posting Permissions

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