Replies: 11 comments 11 replies
-
This is one of the use cases that "computed outputs" were intended for. See outputs.source in the JSON config ref for documentation. The simplest example would combine a group of N logical DOF ports into a single physical device activation. To do this, you'd create one outputs entry to represent the physical device, and N outputs entries to represent the DOF ports. The N entries for the DOF ports wouldn't be attached to any physical device, so their device.type properties would all be set to "virtual". Their only function would be to accept commands from DOF. You'd map all of your DOF outputs to these port numbers - all of the flippers, slings, and bumpers, in your example. If you have two flippers, two slings, and 6 bumpers, you'd create a total of 10 of these "logical" ports that aren't attached to any physical devices. Then, the single additional port that's mapped to the physical device (a contactor, say) would have its source set to merge the inputs from all of the logical ports.
If you had multiple physical devices, it would be straightforward to do the same thing to assign each physical device to a subset of the ports - one contactor shared by the two flippers, one shared by the two slings, one shared by the six bumpers. It would be a bit trickier to create a many-to-many "pool" mapping, where all of the logical devices are mapped to the same shared set of physical devices, and you want each logical activation to trigger the "next available" physical device. I think that's what you're describing. It should be possible with a clever combination of logic conditions that take into account the logical port states and the other physical port states, but it might be complex enough to be worth adding some built-in support.. |
Beta Was this translation helpful? Give feedback.
-
Thanks for pointing this out in such detail. Yes the many-to-many pool mapping is the use case I've in mind. It's good to know that this is possible in principle, I'll have to dive deeper into this to figure out a suitable logic to support this. |
Beta Was this translation helpful? Give feedback.
-
0.1.14 has a new Share Group feature that I think will do what you want. I ended up implementing it as a special-purpose feature on the output ports, rather than as an extension to the 'source' scheme, because I couldn't come up with a good way to generalize it. It just seemed like it needed to be handled as a specific case. There are two new output port elements involved. The first is the The second element is the underlying port that goes into the pool. These ports represent the physical devices in the shared pool. You don't assign these ports to any effects in the DOF Config Tool - DOF never commands them directly. Instead, these ports get commanded indirectly through the This example shows how you could share two physical output ports among the six standard DOF "bumper" ports.
The implementation in 0.1.14 is only lightly tested, but I think the design is pretty sound, and the firmware seems to execute it as expected. I'm definitely interested in your feedback about how the design fits your use case, though, and of course whether the software does the right thing in your setup. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Try testing against the Config Tool Output Port tester. If the issues don't reproduce there, it's probably something in the experimental clients. |
Beta Was this translation helpful? Give feedback.
-
I think I spotted the problem (actually two underlying problems). Test build attached. |
Beta Was this translation helpful? Give feedback.
-
Re the forcePort proposal: That seems simple enough and might be worthwhile. Bur I was thinking earlier about a somewhat similar notion, but a bit more complex, which I think amounts to "overlapping groups". Suppose you have three physical contactors for the bumpers, left/right/center, and you want to map these to the six DOF bumpers in such a way that the Left+Center form one group, and the Center+Right form a second group. Likewise, the DOF virtual ports form two groups: (Rear Left + Rear Center + Mid Left + Mid Center) and (Rear Center + Rear Right + Mid Center + Mid Right). This would keep the directionality roughly right while still maximizing sharing. The reason I bring this up is that it seems like your idea might be a special case of this "overlapping groups" notion, so maybe we should see if we can come up with a way to do that before adding a one-off for the more limited case. But I didn't get very far coming up with a concrete design for it, so I just kept things simple with the one-to-one groupings for the initial attempt. Maybe we could let |
Beta Was this translation helpful? Give feedback.
-
Great - I'll take a look at adding the "overlapping groups" scheme (and maybe the ON/OFF pulse idea) and post another test build. |
Beta Was this translation helpful? Give feedback.
-
One addition to my proposal from above (toggeling output devices). Perhaps it would be feasible to provide a global "toggle mode" option. In this mode, the output devices of shared groups would be toggled at the DOF port transitions rather than being synchronised with the corresponding DOF ports. |
Beta Was this translation helpful? Give feedback.
-
The new 0.1.16 release implements the scheme above that allows for multiple share groups per DOF port and per physical device port. It also implements a pulse mode option on the DOF ports. (I don't think I see any upside in a "pulse mode only" variation, since I think you can achieve that if you really wanted to with the per-port pulse mode settings, but I also think you probably don't really want to do that with most ports, which by their nature won't tend to hog ports to begin with. Having another global variant would add a lot of complexity, which creates ongoing maintenance costs and places constraints on future features, so I'd rather keep it to one way of doing things.) |
Beta Was this translation helpful? Give feedback.
-
I'm testing with almost that identical configuration, and it's working on my end. What does your firmware build number say (in the Overview window)? Mine is saying 0.1.16 build 202506302130. The warnings about empty groups are almost certainly the problem, but I can't see why they're happening - the config lines look right. I'll try copying and pasting your config text literally in case it's some weird character set issue or something I can't see on-screen. ...Nope, copy and pasted your text, works fine here. Unclear what's wrong. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
In some configurations, there may be only a limited number of feedback resources for a higher number of corresponding dof ports. For example, there may be only four contactors available for dof ports for the flippers, sling shots and bumpers (7 dof ports in total).
In this case it would cool if some of the inputs (dof ports) could be assigned to a group of "shared" outputs (contactors) so that one arbitrary unused output of this group fires (if any is available) when the corresponding dof port is triggered.
The PinOne advertises this as "solenoid sharing feature".
Beta Was this translation helpful? Give feedback.
All reactions