Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: TheGreatMarklar on June 28, 2019, 12:24:06 PM

Title: Logic interraction with physical I/O
Post by: TheGreatMarklar on June 28, 2019, 12:24:06 PM
If I have logic switch on Y0 (OUT or SET, not an immediate instruction) at the start of a program, how does the logic in the rest of the program handle Y0? Is it on as soon as the logic turns it on, or not until the next scan when the output table has been updated?

Code: [Select]
Example:

Rung 1
STR X1
OUT Y0

Rung 2
STR Y0
OUT Y1


Does Y1 activate at the end of the same scan as X1, or is there a 1 scan lag as X1 activates Y0, the output table updates, and Y0 then activates Y1 on the next scan?
Title: Re: Logic interraction with physical I/O
Post by: BobO on June 28, 2019, 12:42:12 PM
If I have logic switch on Y0 (OUT or SET, not an immediate instruction) at the start of a program, how does the logic in the rest of the program handle Y0? Is it on as soon as the logic turns it on, or not until the next scan when the output table has been updated?

Code: [Select]
Example:

Rung 1
STR X1
OUT Y0

Rung 2
STR Y0
OUT Y1


Does Y1 activate at the end of the same scan as X1, or is there a 1 scan lag as X1 activates Y0, the output table updates, and Y0 then activates Y1 on the next scan?

Y0 and Y1 are just memory locations in the image register. The memory is updated immediately. The final state of Y memory is written to the I/O at the bottom of the scan.