Main siteMain site  ForumForum  ForumSearch  Private messageEmail contact  RegisterRegister  Log inLog in 
Topic: Ganglion connection timeout problem
Reply to topic
Author Message
EMebane



Joined: Apr 15, 2019
Posts: 67

PostPosted: Aug 18, 2019 8:32 PM    Post subject: Ganglion connection timeout problem

My design has grown and now it takes a bit longer for BioEra to initialize it. The Ganglion connection attempt takes too long and I'm getting a Ganglion Device Not Detected error. The Ganglion blue LED stops blinking and turns solid about 2 seconds after pressing Play indicating that BioEra has begun communication with it, then while BioEra elements are still populating (text fields populate with text, etc.) about 2 seconds later the Ganglion dialog appears. Older smaller designs still work fine. I thought I read somewhere about extending the Serial port connection wait time but I don't see anything related to that in the SerialPort Element. BTW: I'm using the newer BLED112 dongle. I have reloaded the design, restarted my computer, etc.
jarek



Joined: Oct 22, 2007
Posts: 721

PostPosted: Aug 18, 2019 8:44 PM    Post subject:

Hard to tell, but it seems like after the communication starts, other elements in the design initialize for too long.

Maybe try to start Ganglion and SerialPort it is connected to a little later?

There are "Do not start" advanced options in all elements. You could select those for those 2 elements, and then use ElementInteractor to start them after the design has loaded and is stable.
EMebane



Joined: Apr 15, 2019
Posts: 67

PostPosted: Aug 18, 2019 9:11 PM    Post subject:

That worked twice out of about 20 tests so far. I don't know if there is some timing circumstances that make it work only sometimes.
jarek



Joined: Oct 22, 2007
Posts: 721

PostPosted: Aug 19, 2019 9:59 AM    Post subject:

What exactly has such a small rate of success? Using the "Do not start" option with ElementInteractor?

I think that would be what I would do (with some delay, for example by adding Delay after SystemEventSource with STARTED option).
EMebane



Joined: Apr 15, 2019
Posts: 67

PostPosted: Aug 19, 2019 10:22 AM    Post subject:

Yes, I'm using "Do not start" option with ElementInteractor. I used a button to trigger the delayed elements you suggested. I could try the automated SystemEventSource with STARTED option you suggest to see if the more consistent timing changes things.
jarek



Joined: Oct 22, 2007
Posts: 721

PostPosted: Aug 19, 2019 10:31 AM    Post subject:

Using button should work just fine. Do you get any errors on console?

One possible idea would be to make sure to start SerialPort first and only then Ganglion (or use DeviceSet), for example by using a Delay with 1 loop for Ganglion element. Incorrect order should end with an error though (I should test it to verify).
EMebane



Joined: Apr 15, 2019
Posts: 67

PostPosted: Aug 25, 2019 11:58 AM    Post subject:

Here's the solution I found:
-- Start the Serial port automatically when the design starts (don't require manual or delayed start for this element)
-- Start the Ganglion element with a button after the design settles (5 seconds). An automatic start after a fixed delay would probably work too.

I discovered that the Serial Port must be initialized with an automatic Start. When I tried using a button for both Serial and Ganglion start I get the failure to connect dialog.
jarek



Joined: Oct 22, 2007
Posts: 721

PostPosted: Aug 25, 2019 1:59 PM    Post subject:

This will work.

But I am pretty sure it should be possible also to start SerialPort at the same time (I can create a snippet if needed). One (small) advantage of this way is that Ganglion can be powered off when the design is started.
Reply to topic