Space Engineers
คะแนนไม่เพียงพอ
RotorPiston Manager
   
รางวัล
ชื่นชอบ
ชื่นชอบแล้ว
เลิกชื่นชอบ
ขนาดไฟล์
โพสต์
อัปเดต
16.785 KB
3 มิ.ย. 2019 @ 11: 16am
3 ต.ค. 2020 @ 4: 52am
4 หมายเหตุการเปลี่ยนแปลง ( ดู )
คำอธิบาย
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 ความเห็น
Blacky Watchy 12 ก.พ. 2024 @ 1: 43pm 
thanks
tataroselyne  [ผู้สร้าง] 12 ก.พ. 2024 @ 10: 18am 
@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 ม.ค. 2024 @ 2: 48pm 
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 ก.ค. 2022 @ 12: 10pm 
would I be able to use this in my workshop upload with credit?
Merii 14 มี.ค. 2021 @ 9: 37pm 
Thank you so much for this script! It works great!
tataroselyne  [ผู้สร้าง] 3 ต.ค. 2020 @ 4: 58am 
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 ต.ค. 2020 @ 11: 54am 
if "FORCE" is what I asked for, I love you :D
tataroselyne  [ผู้สร้าง] 1 ต.ค. 2020 @ 6: 58am 
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  [ผู้สร้าง] 30 ก.ย. 2020 @ 1: 38am 
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 ก.ย. 2020 @ 11: 03pm 
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