Space Engineers

Space Engineers

Ikke nok vurderinger
RotorPiston Manager
   
Pris
Føj til foretrukne
Gjort til foretrukken
Fjern som foretrukken
Filstørrelse:
Offentliggjort:
Opdateret:
16.785 KB
3. juni 2019 kl. 11:16
3. okt. 2020 kl. 4:52
4 ændringsbemærkninger ( vis )

Abonner for at downloade
RotorPiston Manager

Beskrivelse
The goal :
One Programming Block who permit the positioning at smooth speed of all rotor/piston in a grid by dynamic argumented command.

How-to :

Use the prog block with the following argument :

<Tag>,<Ordered Value>,<Mode>,<MaxSpeed>(option)

Tag = the keyword who permit to identify the rotor(s)/piston(s) concerned by the move
Ordered Value = could be many thing, depend of the Mode
Mode = "POS" , ordered value is the new position to reach
= "INC", add ordered value to Actual Position and go to it
= "SWING", add ordered value to Actual Position and go to it, then go back, then go again ...
= "LEARN", store actual position in a 10 values - array, ordered value is the slot number
= "RECALL", recall a stored position and go to it, ordered value is the slot number
= "SUN", rotor become sun tracker, solar panel with the same tag become the reference for sun tracking
= "FORCE", set a manual speed (in RPM)
= "RELEASE", script will stop to force the actuator to stay at the last ordered position


For exemple with 3 blocs in the grid "Rotor1 Drill", "Rotor2 Drill", "Piston X"

Rotor1,60,POS -> only "Rotor1 Drill" will go to 60° position at 8RPM max
Rotor1,45,INC,2 -> only "Rotor1 Drill" will go 45° further at 2RPM max
Rotor,45,INC,2 -> same but with "Rotor1 Drill" and "Rotor2 Drill" at same time
Drill,45,INC,2 -> same as previous
Piston,2.3,POS,0.2 -> "Piston X" will extend to 2.3m
Rotor1,0,LEARN -> Actual Position of Rotor1 is saved on slot 0
Rotor1,5,RECALL -> Rotor1 will go to position previously saved on slot 5
Rotor1,7,FORCE -> only "Rotor1 Drill" will move at 7RPM



Sun Tracking Method :

Use the same unique Tag for a rotor and one embedded Solar Panel.
Exemple : "Rotor SunTracker" and "SolarPanel SunTracker"
Run script with argument -> SunTracker,180,SUN

The Rotor will start to track the sun using ref solar panel to optimize alignement efficiency.
Second argument is the default position.
If ref solar panel fall at null solar exposition, he will go to 180° position, if finding light during travel, will start to track again.



Rotors & Pistons Position Publishing :

Insert the tag "ActuatorState" in the name of any LCD Panel in your grid, for exemple "LCD Panel ActuatorState"
Recompile the script.
The script will erase actual content of the LCD, and publish the name & position of all Rotor and Piston handled by the script.


--------------------------------------------------------------- Tips & Helps


- You could request a new move during any other not finished move
- Speed Modulation when approaching ( speed = pfactor * distance + min speed -> capped by max speed)
- 4 factors are available at beginning of code to adapt the positionning behavior with your inertia system (pfactor, min speed, arrival precision, default max speed)
- Script will maintain last ordered position if the actuator is not manually or automatically released
- 1 boolean is available at beginning of code to automatically release actuator after a move
- Recompile the script if you want to quiclky get back the hand on all the actuators
15 kommentarer
Blacky Watchy 12. feb. 2024 kl. 13:43 
thanks
tataroselyne  [ophavsmand] 12. feb. 2024 kl. 10:18 
@Blacky
You can use the Release command, or open the script, in the first lines you have a boolean to switch to auto-release the rotor after each command
Blacky Watchy 24. jan. 2024 kl. 14:48 
would it be possible to make it to just perform the action once and then stop trying to get the rotor to reach the angle? it is causing some problems with my current project
TiredAJ (they/them) 7. juli 2022 kl. 12:10 
would I be able to use this in my workshop upload with credit?
Merii 14. mar. 2021 kl. 21:37 
Thank you so much for this script! It works great!
tataroselyne  [ophavsmand] 3. okt. 2020 kl. 4:58 
It is :d
I also separate pFactor for Rotor and for Pistons, Pistons are clearly more delicate to get a smooth stop.
cy-one 2. okt. 2020 kl. 11:54 
if "FORCE" is what I asked for, I love you :D
tataroselyne  [ophavsmand] 1. okt. 2020 kl. 6:58 
Global Update :

- New feature : Position of all handled actuators is now published on LCD Screens tagged "ActuatorState"
- New function FORCE to manually set a speed move to actuator
- New function RELEASE to stop script handling on an actuator
- Possibility to automatically release an actuator after move with a command line at beginning of the script
- Possibility to set a by default max speed at beginning of the script
- SWING function fixed for Rotors
- By default positionning setting is now more nervous.
tataroselyne  [ophavsmand] 30. sep. 2020 kl. 1:38 
I check for it, for now you can use a timeblock and repeat an INC command.

I will soon add an update with :
- LCD feature to list actuator handled with position
- Release function to stop forcing actuator position after move (could help for your problem)
- Save/Restore actuator setup to not lose every command at each gaming session
cy-one 27. sep. 2020 kl. 23:03 
Can you add a command that allows to just keep spinning?
I'd love to have a drill head that, when in use, just continously spins and then "parks" itself at a specific angle when done.
The second half I can do with the script, the first half I can't :D