Stationeers

Stationeers

(IC Code) Perfect Solar Tracking 2.0 With Reset
62 kommentarer
123 16. maj 2022 kl. 13:07 
Fenris 11. maj 2022 kl. 12:44 
If I run setting sun orbit 2 instead of default 1 - should I then change anything in the script ?
Right now the script doesn't seem to work
LP 11. apr. 2022 kl. 16:33 
Won't run. Multiple code errors. Looks like depreciating daylight sensor modes broke this.
Mokmo 31. mar. 2022 kl. 20:34 
So it requires a batch writer circuit per type of solar panel. Could use the sb commands.
Stormfire962 26. feb. 2022 kl. 15:39 
@Daniel - Make sure the data port on your day light sensor is facing north. Otherwise it will not work.
Daniel 15. dec. 2021 kl. 9:03 
soo, uhh, i tryed this and other stuff .. but i never seem to get solar traacking to work .. using this code i got the panels to work but they follow the sun at paralel to the ground ... while my sun is up in the sky .. WTfH am i doing wrong .. pls ... help
Cumu[FR] 1. nov. 2021 kl. 1:39 
Hello, You don't need batch writer you can command all solar panels with this command:

sb -539224550 Vertical vangle
sb -539224550 Horizontal hangle
Waldo 6. sep. 2021 kl. 1:51 
ok, it's giving me an error on line 14, or where s DaySen Mode 2
Peptide 1. sep. 2021 kl. 15:52 
Use this code here:

[code]
alias DaySen d0
alias writeVert d1
alias writeHor d2
alias angle r0
alias running r1
s DaySen Mode 2
yield
Start:
#Sun up check
l angle DaySen SolarAngle
s DaySen Mode 1
bgt angle 92 Reset
move running 0
#Vertical
l angle DaySen Vertical
sub angle 75 angle
div angle angle 1.5
s db Setting angle
s writeVert On 1
yield
s writeVert On 0
yield
#Horizontal
l angle DaySen Horizontal
s DaySen Mode 2
mul angle angle -1
s db Setting angle
s writeHor On 1
yield
s writeHor On 0
yield
j Start
#Sun not up Reset
Reset:
bnez running Start
s db Setting 0
s writeVert On 1
yield
s writeVert On 0
yield
s db Setting -90
s writeHor On 1
yield
s writeHor On 0
yield
move running 1
j Start[/code]
Peptide 1. sep. 2021 kl. 15:30 
@Lammert

Setup wiring as per the video.

For IC just change solarangle in vertical and horizontal sections to Horizontal and Vertical respectively. Make sure its case sensitive etc. Make sure you're exporting to the IC too. I have it working on Mars albeit slightly off angle so will check code.
Lammert 22. aug. 2021 kl. 1:44 
Can't get it to work even with the tips from @efspock and @Blast
Can someone update the code?
Blast 27. juli 2021 kl. 19:39 
had to change solarAngle in the vertical and horizontal commented sections to Horizontal and Vertical but got it working with a few tweaks
BH0938 4. apr. 2021 kl. 10:45 
ok I still not getting it correct. Can you message me a pick of the new code or post it?
efspock 2. apr. 2021 kl. 15:48 
I was able to get the script to work with a few changes. The daylight sensor no longer needs to change modes to read horizontal and vertical(it can read both at the same time now) so the lines where it changes the mode of the DaySen are no longer required. Also the game stores the values you need in Horizontal and Vertical instead of SolarAngle. After changing those lines it properly tracks the sun(at least on mars). You also have to change the math for horizontal tracking to - 180.
BH0938 26. mar. 2021 kl. 17:54 
Anyone have an issue with this working on the Moon? It does not seem to track horizontally correctly.
VisceralDth 21. mar. 2021 kl. 5:29 
So i'm happy to say that after 10hrs of trying to get this to work I finally succeeded. Thank you for this mod its extreamly helpful
Waffelmonster 8. mar. 2021 kl. 4:41 
Not Working
Error line 34
8th March 21
ждун 15. feb. 2021 kl. 19:15 
not working.
Set and wired up everything like in the video.
It moves only one panel in the array.
It moves it somehow random-like but not facing the sun.
At night it goes crazy rotating randomly in all directions.
Housing is indicating IncorrectLogicType at line 16.

Its the line where it switches mode on sensor. Don't see what might be wrong there, but the script actually runs through despite the error, and i can also watch it on sensor that its actually switching between horizontal and vertical.
jay.jahn 30. jan. 2021 kl. 16:46 
Not working 1/31/2021
S.jc9181 20. jan. 2021 kl. 3:12 
Yeah not working for me since they updated stuff.
Genocide 9. jan. 2021 kl. 10:36 
Error on line 16 for me. Any thoughts?
Waikiki Tim 31. dec. 2020 kl. 22:50 
Berticus603, glad it works for you. :-)
Berticus603 31. dec. 2020 kl. 20:14 
Waikiki Tim you are an officer and a gentlemen that works perfect. I took a look and the only difference between my edits and yours was the Horizontal lines 33-34ish with the math.
Mine was off explaining my tracking error when I tried to correct the script myself.
Berticus603 31. dec. 2020 kl. 16:01 
Thanks for that will give that one a try and look at the code as well.
Waikiki Tim 31. dec. 2020 kl. 14:17 
I just published one that is working for me. I shamelessly used Bushwackah's code as a starting point. It's called WT Solar Tracking... if you're interested.
Berticus603 31. dec. 2020 kl. 13:40 
Stopped working due to the changes they have made to the sensors on around 29DEC2020. Been working myself and trying to figure out a change to make it work but so far no luck. I am having issues since this is a script language I don't normally use with my IT work.:steamfacepalm:
boxanata 29. dec. 2020 kl. 14:39 
Don't even bother wasting your time with this. It doesn't work.
jammer131 27. dec. 2020 kl. 14:37 
@Skybinary this is a IC Memory program script that requires a computer and the IC Houseing to work you would load it like a normal code program
Skybinary 1. dec. 2020 kl. 7:55 
awwww i really wanted to try this but the only item in the in-game workshop is 'core', its probably a 'me' thing lol, but i am subscribed, are there other steps i need following?
Clavdivs 4. nov. 2020 kl. 9:07 
@BRINK$TAR, did you get it to work? Because I got the same error when I had the chip in the IC Housing/Computer, but when I moved it to the solarpanels, it worked without a hitch.
rGlory 13. okt. 2020 kl. 18:11 
Great job!

Suggestion, as you detect nighttime/daytime anyway can you add code that it would set On to 1 at daytime and 0 on night time on lets say D4 (if it is connected) and probably reverted on D5
BRINK$TAR 30. sep. 2020 kl. 15:35 
i have done the changes for line 15 and 25 still not working plus tired gg natas code get error line 16 ??? any help with gettting solar going cheers
Barbarian 6. aug. 2020 kl. 11:45 
[GG] Nãtã§-[FLM]- Thx man. I had the same problem on Europe, but your corrections helped. Now it's 98-99% all day long.
[GG]Nã†ã§-FLM- 15. juni 2020 kl. 15:26 
here is the pastebin link for my edited code https://pastebin.com/U5bLN7MX
[GG]Nã†ã§-FLM- 15. juni 2020 kl. 15:24 
i am playing on Europa and had to modify the code as it would track fine but when the sun went down the solar panels would go crazy for about 1/2 the night.
[GG]Nã†ã§-FLM- 15. juni 2020 kl. 15:24 
if anyone would like to use my edits untill @Bushwackah can update his you are more then welcome i take no credit for this code and @Bushwackah if my changes are good your are welcome to include them into your code no credit needed.
Waikiki Tim 31. maj 2020 kl. 2:57 
I found the problem, I'm not sure if it's clear from reading the comments below, but... change line 15 to s DaySen Mode 1 and change line 25 to s DaySen Mode 2 . Essentially, they're backwards when you download it from the workshop.
Waikiki Tim 30. maj 2020 kl. 19:37 
@calgorn, I've had that happen a lot when I'm struggling to set up solar. I think it happens when it tries to set the angle to a negative number. And that means something is still not set up right. Keep checking every setting (or daylight sensor position) until you find the one that's wrong. If you're willing to publish your save, I'd be willing to take a look at it.
calgorn 30. maj 2020 kl. 13:23 
I got all this set up and my solar panels freak out. They don't track the sun, they just cycle from one extreme to the next then reset and loop. I've tried various suggestions from both Perfect Solar posts and cant get it to work.
Waikiki Tim 26. maj 2020 kl. 22:12 
Turns out all I had to do was select my IC Housing from the drop down list... even though it showed as already selected and there was only one.
Waikiki Tim 18. maj 2020 kl. 2:53 
After struggling with this for a while, making changes, exporting, etc. I finally did an import from the chip. It was still the same code as the original. So, I created a new script and copied the code into it and made my changes. Using that version worked for me... mostly. It seemed like it tried to do the reset a few times during the day. Other than that, efficiency was 98%-100%.

I ended up using the no-reset version of this since I'm behind a mountain and the solar panels are in place by the time the sun comes over it.
Rawblin 16. maj 2020 kl. 7:49 
Switched to using "UfoL's Solar Tracking" since he has updated it and it is working perfectly. If you previously had been using this, your daylight sensor should be facing upwards, with its connection on your North. If that is the case, set your 'HOffset' variable in UfoL's script to "0" (zero) from 90. Make sure you have the vertical and horizontal batch writers set properly in the D1, D2 of your IC housing, and you should be working perfectly again.
Orca 16. maj 2020 kl. 5:51 
still broken even after editing the s DaySen Mode 2" Needs to be Mode 1, and Horizontal needs to be Mode 2.
Troll 15. apr. 2020 kl. 6:55 
Naxster

thanks
^^
Naxster 14. apr. 2020 kl. 18:20 
Bushwackah. I think the daylight sensor modes got swapped. "#Vertical
s DaySen Mode 2" Needs to be Mode 1, and Horizontal needs to be Mode 2. I swapped these in the editor and it's working agian.
KindThing 12. apr. 2020 kl. 13:12 
I have an error on line 16?!
It doesnt seem to be tracking the Sun correctly. I have it set up they way you have shown in you YouTube Tutorial...?? Could you pls help?
Owngalaxie 7. apr. 2020 kl. 13:59 
I had some success with Bushwackahs other script (no reset) with a yield after the s"set" and l"oad command for the daylightsensor. It works fine for me again with no other changes at 97-99% eff.
Macgunius 6. apr. 2020 kl. 9:49 
I found the fix update of the script. search at "Bushwackah's Perfect Solar Tracking- Fix"
Rawblin 5. apr. 2020 kl. 16:23 
Shdwdrgn, I did that earlier and it tracks, but it errors out at nighttime with a line 16 problem. Didn't wait to see if it started properly tracking the next morning though.