Piston retraction ignores max distance value

Bob Stewart shared this bug 5 hours ago
Submitted

VS2.3 Vrage3 v2.3.0.2798. I have a large piston and a 4 button button panel to control it. Button 1 sets max distance to 0. Button 2 sets max distance to 5. Button 3 sets max distance to 10. Button 4 sets reverse direction. Piston configuration is: Piston Velocity 5.0, Piston Force 100000000.0, Max Distance Variable controlled by button - default to 0, Min Distance 0, Control Velocity 1, No to detach top.


When I am in positive velocity and am in distance 0:

Press button 1, nothing happens - distance remains 0 meters (expected)

Press button 2, piston extends to 5 meters (expected)

Press button 3, piston extends to 10 meters (expected)

Press button 4, piston goes to -5 velocity (expected)

Press button 2, piston retracts to 0 meters (not expected, expected behavior should be for piston to retract to 5 meters distance) This is a bug.

Press button 4, piston velocity set to 5 and piston automatically extends to 5 meters (not expected, piston should not move, but previous setting of distance to 5 is triggered)


It looks like max distance is being ignored during a retraction type of event. All retractions cause piston to go to 0 distance regardless of current max distance setting.

Replies (2)

photo
1

Maximum distance is for when you are extending. Minimum distance is for when you are retracting.

It does not appear in your setup that you have changed the minimum distance from 0. Therefore, when velocity is reversed it will retract to the minimum distance, 0. This is expected behaviour and the same as SE1.

photo
1

Thank you Sandcrawler for the explanation. I have never played SE1, so am not familiar with that behavior. Kind of confusing if you ask me... Keen really just needs a "Set Current Distance" variable to simplify things. I am trying to use a piston as the driving force for a multi-floor elevator. Not a simple task given the variables that need to be modified logically. Especially without being able to programmatically determine current distance vs what new value is selected.


Thanks though!!!

photo
1

I mention SE1 as I know there will likely not be many SE2 tutorials out there, a lot of SE1 tutorials for this type of thing will still be applicable if you can look through the UI and appreciate just the logical parts. There will, however, be quite a bit missing from the blocks logic in SE2 in comparison as it is still early doors.


An elevator will need a little bit more logic than I think you can fit behind a single button for each floor, have a look at the event controllers and timers.

photo
1

Those 2 blocks were where I was heading. Is there a way to inquire what the current distance is of the piston? Thanks!

photo
1

Event controller piston distance is the closest you will get, you are comparing to a static value though. It will not return you any variable to work with or that you could pass to another block. Just a threshold on which to take an action.


You do know your floor heights though, it will be some multiple of 25cm, and you can set the piston distance.

photo
1

Yep but event controller didn't work for now with piston. If you enter a value to compare (lower than for instance) it didn't register the value. when you check the value is reset to 0.0

Theres is a lot of small but like this i hope they will fix soon. IE : sensor block that work even when deactivated...)

photo
Leave a Comment
 
Attach a file
You can't vote. Please authorize!