Jump to content



Photo
- - - - -

FX3 + sainsmart - Flipper Solenoid Retriggering


  • Please log in to reply
49 replies to this topic

#1 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 08 April 2021 - 02:08 PM

Hi there,

 

I'm having some trouble with my DOFLINX setup using an 8-port sainsmart (only using ports 1-4) on Pinball FX3.

 

The problem is that when I hold down either flipper, the solenoids sometimes randomly re-trigger. When this happens, the flippers still stay up, unlike in the previous post by chacha123.

 

This problem appears worse on some tables than others. Specifically, I notice this happening on Medieval Madness a lot, but very less so on Fear Itself.

 

Some testing I did:

I noticed that with Debug mode on, the retriggering happened more frequently. Possibly a CPU usage thing?

 

The 8 relay app which lets you trigger each port separately fires all solenoids just fine for any given amount of time, so I think I can possibly rule out an electronics issue.

 

The only other device DOFLINX uses is Pinscape for nudge, and the Xbox 360 controller for vibration. Disabling them seems to have had no effect.

 

A screenshot here with my DOFLINX output holding the right flipper: https://imgur.com/lrPist3

 

Any guidance would be much appreciated! Thanks!



#2 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 09 April 2021 - 05:58 AM

Are you setting TRIGGER_DEBOUNCE_TIME= in your DOFLinx.INI file?  If so what are you setting it to?


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#3 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 09 April 2021 - 12:24 PM

I am not using that parameter and it is not in my ini file. Should it be?

 

Also I did some more testing last night. Even when I have doflinx point to a port that has no solenoid connected, the port will randomly turn off then on again when the flipper button that triggers it is held down. So I don't think it's the solenoids themselves.


Edited by xavior38, 09 April 2021 - 12:26 PM.


#4 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 10 April 2021 - 12:24 AM

I am not using that parameter and it is not in my ini file. Should it be?

 

Also I did some more testing last night. Even when I have doflinx point to a port that has no solenoid connected, the port will randomly turn off then on again when the flipper button that triggers it is held down. So I don't think it's the solenoids themselves.

 

Its not your hardware.  You can see from the log that you posted that the flipper is being triggered, turned off, then back on.  DOFLinx is reflecting the trigger messages coming from FX3.  One thing to remember is that FX3 is not built for what we are doing here, so its not an exact science.

 

The TRIGGER_DEBOUNCE_TIME= can be used to stop secondary triggering in cases like yours.  Essentially it means that the input trigger from FX3 will not retrigger the output for at least the number of milliseconds specified.  It might be worth trying it set at about 500 (100 is the default).

 

You may be able to make it better, but its possible that you will not get a perfect result when you hold the flippers down for a long period.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#5 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 11 April 2021 - 09:27 PM

The problem is markedly worse when I have debug mode on in doflinx. Can it be something to do with the internal polling rate? CPU usage?

#6 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 12 April 2021 - 01:30 AM

Having logging (DEBUG) on will always make things go slower.  You can set DEBUG=2 which will stop the screen interaction and is much faster.  Alternatively you can run the debug window on a secondary machine via TCP/IP if you are networked.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#7 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 12 April 2021 - 02:16 AM

Yeah but what I mean is the retriggering issue happens more when debug is on. If debug us causing slowness, maybe this is a CPU related thing and not fx3?

#8 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 12 April 2021 - 04:31 AM

Yeah but what I mean is the retriggering issue happens more when debug is on. If debug us causing slowness, maybe this is a CPU related thing and not fx3?

 

Yes.  Different types of logging will slow down DOFLinx more than others.  DEBUG=1 has to do the slowest thing, update a window.  DEBUG=2 does about the second slowest thing, disk access.  DEBUG=2 with TCP/ip link will be fastest.  Having said that, if you run DEBUG=2 it should not impact much at all.

 

FX3 triggers that are linked to are imprecise and not created for the purpose we are using them for.  They are best used as "rising edge" triggers in electronics speak, another words detecting them coming on is easy.  Detecting them staying on is harder.  The slower the PC and the more work its doing (logging, higher resolution, slower GPU, etc) the more impact.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#9 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 12 April 2021 - 10:10 AM

Thanks. Do you think having a faster cpu or raising the windows priority level of doflinx might help with this issue?

I'm using a Xeon processor which is like 9 years old. Probably the rough equivalent in speed to an i5-2400

#10 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 12 April 2021 - 12:10 PM

FX3 is imperfect when linking to toys.  A faster CPU / more power in general may mask some of the issues in this imperfect world.  How much does it both you?  In real game play is it a real issue?  Is it worth $500-  $1000 by the time you muck around with it all?

 

It is a software issue, there is likely a software solution.  What table are you testing with?  I'd rather have a look before you try and throw resource at it.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#11 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 12 April 2021 - 01:53 PM

It does take out some of the immersion, I will admit. A lot of my playstyle is catching the ball to a stop and then letting it roll to do precise shots, so I am holding down a flipper for a lot each game.

 

It happens on all tables, but I notice it more on the Williams ones - specifically Medieval Madness. If I leave Debug mode on "1" and i play for a couple minutes I will generally notice it trigger 1 or 2 extra times after holding the flipper down for a few seconds.

 

Without debug mode, it is far less frequent but still happens.

 

Thank you for your help and for looking in to this



#12 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 13 April 2021 - 02:06 AM

With the details of the tables I'll give this a try on my cabinet and see if I can reproduce it.  If I can reproduce it I can fix it  :tup:

 

Stay tuned ......


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#13 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 13 April 2021 - 01:54 PM

If it bleeds.. we can kill it

#14 wiesshund

wiesshund

    VPF Legend

  • Members
  • PipPipPipPipPipPipPip
  • 11,859 posts

  • Flag: United States of America

  • Favorite Pinball: How many can i have?

Posted 13 April 2021 - 08:01 PM

If it bleeds.. we can kill it

 

That isnt true

LOL


If you feel the need to empty your wallet in my direction, i don't have any way to receive it anyways

Spend it on Hookers and Blow


#15 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 15 April 2021 - 02:16 AM

I did some further testing

 

Setting doflinx's priority in Windows 10 to "Realtime" resulted in yet fewer re-triggers.. but they still happen

 

Also now very occasionally I will not hear the solenoid go off when hitting a bumper or slingshot, yet the xbox controller (controlled through doflinx) will still rumble on each hit. I imagine that indicated doflinx knows about the event, but for some reason is not calling the solenoid to fire, or is being interrupted somehow?



#16 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 15 April 2021 - 04:39 AM

I did some further testing

 

Setting doflinx's priority in Windows 10 to "Realtime" resulted in yet fewer re-triggers.. but they still happen

 

Also now very occasionally I will not hear the solenoid go off when hitting a bumper or slingshot, yet the xbox controller (controlled through doflinx) will still rumble on each hit. I imagine that indicated doflinx knows about the event, but for some reason is not calling the solenoid to fire, or is being interrupted somehow?

 

For the rumble / no toy, look at the DOFLinx log.  If the log says its been triggered then the message has gone to DOF, so you may need to look at logs there to see why the solenoid is not firing.

 

I will not be able to look into the other part on my cabinet until at least next week - sorry.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#17 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 15 April 2021 - 11:05 AM

Thanks. I've actually been able to corroborate my findings with someone else who has the same setup (modded a1u pinball using sain smart + doflinx with fx3), so it's possibly software related.

#18 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 16 April 2021 - 12:08 AM

Hmmm, temporarily stumped on this one.  I've tested on my cabinet this morning and in all cases the flipper solenoid stays on for the maximum time I set in my DOFLinx.INI with LINK_LF / LINK_RF.  I use 5000mS, I can see you use 10000mS which will make no difference to this issue.  I have tried with full logging and other things running on the PC as well to load it up, cannot recreate.

 

Looking back at your original screen shot I can see that DOFLinx is definitely getting the message from FX3 that the flipper key has been lifted.  So this is nothing to do with DOF or SainSmart, etc.

 

If you are getting different results based on the priority of processes and the load on the machine (ie logging, no logging, etc), then my only currently remaining theory is that your PC is loaded up to a level where it cannot process FX3 and have DOFLinx read the trigger reliably in real time.  With the test on another cabinet that you did, was it the same / similar hardware to yours?  What are your PC and keyboard encoder specs (just fishing now)


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here

#19 xavior38

xavior38

    Hobbyist

  • Members
  • PipPip
  • 31 posts

  • Flag: United States of America

  • Favorite Pinball: Star Trek

Posted 16 April 2021 - 01:28 AM

It's somewhat random. Gotta play for a couple minutes sometimes for it to happen.

 

The other computer is also an older one, albeit like a newer generation i5-3750 I think.

 

My own computer never shows doflinx load at higher than like 4-5%, and fx3 not higher than 50-60%

 

Did you try with DEBUG=1?

 

Can the hardware be interacting with doflinx or fx3 somehow?



#20 DDH69

DDH69

    Pinball Wizard

  • Platinum Supporter
  • 3,570 posts
  • Location:DOFLinx HQ, Adelaide

  • Flag: Australia

  • Favorite Pinball: Monster Bash

Posted 16 April 2021 - 02:03 AM

Yes I tried with DEBUG=1 and another special flag that logs even more placing even more load on things.

 

Its a software thing.  DOFLinx loops around continuously checking if the flipper is pressed according to FX3.  When it first sees it go on it triggers the actions for flipper down, when FX3 stops reporting the flipper as pressed it releases.  Really that simple.  So DOFLinx is getting the flipper up message from FX3 somehow.  As I've said before, FX3 does not support what we are doing natively.  So its not an exact science.  I will continue to consider what else might be going on here.  I may even add some more logging in a version of DOFLinx for you to run so that we can gather more information if you are happy to do so.


DOFLinx
Contributions for equipment to help with ongoing DOFLinx development can be made here