Stationeers

Stationeers

View Stats:
Unit 744 Feb 10, 2021 @ 12:36pm
Integrated Circuit -> Batch Writer: Incorrect Logic Type
Just getting into programming with integrated circuits (having prior programming experience), and I successfully created a little script to allow a solar panel to track the sun with 99% efficiency all day long. This script flowed from daylight sensor -> IC housing -> solar panel. It worked, but could only control one solar panel at a time.

Naturally, I wanted to modify this to use a Batch Writer instead, to allow more solar panels to rotate. I simply added two batch writers (one for vertical and one for horizontal), configured them to input from the IC Housing, output to the solar panels, and use the variable Vertical and Horizontal respectively. I modified my script slightly, but now I get an error:

Error IncorrectLogicType at line 24


See my full script below:
##BEGIN SCRIPT##

# ALIGNMENT:
# Solar Panel: Data Port 0 deg / Power 180 deg
# Light Sensor: Data Port 90 deg / Facing Up

alias DLSv d0
alias DLSh d1

alias SPv d3
alias SPh d4

alias VE r0
alias HE r1

start:
l VE d0 Vertical
l HE d1 Horizontal

min VE VE 75
div VE VE 150
mul VE VE 100
sub VE 50 VE

add HE HE 90

s d3 Setting VE #THIS IS LINE 24
s d4 Setting HE

yield

j start

##END SCRIPT##



Basically, why is the batch writer rejecting the 'Setting' variable type? Using Vertical or Horizontal as the variable types also results in the same error. Is there some other variable type I should be using? I just cannot figure this out...

Thanks in advance.



EDIT:

So I managed to fix this by adding memory circuits between the IC Housing and the Batch Writers. These Memory circuits seem to accept 'Setting' variable types, and the Batch Writers accepted the Memory circuits as input.

I still assume this is some sort of bug. It seems weird to me that Batch Writers would be unable to directly accept a float from an Integrated Circuit.
Last edited by Unit 744; Feb 10, 2021 @ 12:47pm
Originally posted by gpedro178:
I think the command for batch writers are something like ForceWrite, anyway, the way i've seen implemented the batch writers are by writing the values on the IC housing and reading them with the batch writers by turns.
Example:
s d4 On 0
s db Setting VE
s d3 On 1
yield
s d3 On 0
s db Setting HE
s d4 On 1
yield

Also now you can prescind of the batch writers and the batch readers using the commands "sb" (to batch write) and "lb" (to batch read) in your code. Take in account that you must use the hash code to select the type of device you are going to write and/or read.
< >
Showing 1-2 of 2 comments
letaquiner Feb 10, 2021 @ 1:28pm 
With sb you can directly write to devices sans batch writers.
The author of this thread has indicated that this post answers the original topic.
gpedro178 Feb 10, 2021 @ 2:12pm 
I think the command for batch writers are something like ForceWrite, anyway, the way i've seen implemented the batch writers are by writing the values on the IC housing and reading them with the batch writers by turns.
Example:
s d4 On 0
s db Setting VE
s d3 On 1
yield
s d3 On 0
s db Setting HE
s d4 On 1
yield

Also now you can prescind of the batch writers and the batch readers using the commands "sb" (to batch write) and "lb" (to batch read) in your code. Take in account that you must use the hash code to select the type of device you are going to write and/or read.
< >
Showing 1-2 of 2 comments
Per page: 1530 50

Date Posted: Feb 10, 2021 @ 12:36pm
Posts: 2