[0.16.36] Train stop circuit network glitch

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
regular_human
Burner Inserter
Burner Inserter
Posts: 6
Joined: Wed Apr 05, 2017 12:50 am
Contact:

[0.16.36] Train stop circuit network glitch

Post by regular_human »

Hi, I've run into a really awkward problem with train stop circuit logic.

It seems that the "Read Stopped Train" signal is sent at least one tick earlier than "Read Train Contents."

I identified this glitch while trying to answer the question, "how do you read that there is an empty train waiting, when you don't know what it was originally loaded with?"

The simplest answer I found is: ( [Everything] == [T] ) && ( [T] != 0 )
(where T is the train ID)

However, a train that is not empty will generate a "true" signal for the first frame that it is stopped.

That single tick false-positive is being a real pain in my butt right now with my current project. Is this something you can/might do anything about?

Thank you!
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: [0.16.36] Train stop circuit network glitch

Post by disentius »

Tested with a signal to pulse converter.
(it blocks all output after the 1st tick)
I get both signals in the counter. Only possible when they fire in the same tick.
Constant combinator is a reset.
read train.gif
read train.gif (862.27 KiB) Viewed 1622 times
BluePrint
User avatar
steinio
Smart Inserter
Smart Inserter
Posts: 2638
Joined: Sat Mar 12, 2016 4:19 pm
Contact:

Re: [0.16.36] Train stop circuit network glitch

Post by steinio »

Try it with an arithmetic combinator belt * -1 = belt.
The belt signal should be delayed one tick.

This scenario is common in LTN setups.
Image

Transport Belt Repair Man

View unread Posts
User avatar
disentius
Filter Inserter
Filter Inserter
Posts: 694
Joined: Fri May 12, 2017 3:17 pm
Contact:

Re: [0.16.36] Train stop circuit network glitch

Post by disentius »

Ah.. I misunderstood you, i think.

If you substract the T signal before you send the rest, you know that no signal -> no cargo.
Here is how i 'd do it in one tick.
sigsub 0.png
sigsub 0.png (165.52 KiB) Viewed 1620 times
Place this between the station and the rest.
BluePrint
Post Reply

Return to “Gameplay Help”