In Siemens s7-300 are IB and QB calls internal bytes or would QB17 overwrite Q17.0 through Q17.7 ect?
IB and QB are not internal bytes - MB are internal bytes. QB 17 consists of Q17.7 to Q17.0 (most significant bit to least significant bit). 8 bits = 1 byte
IB is Process Image Input Byte
QB is Process Image Output Byte
PIB is Peripheral Input Byte
PQB is Peripheral Output Byte
The scan sequence for the S7-300 (with MMCs) is as follows (simplified for this thread):
Write to Process Image Outputs
Read from Process Image Inputs
Execute Code (OB1 & any other OBs for interrupts, timed interrupts, etc.)
Repeat
Peripheral Inputs and Peripheral Outputs are immediately read from and written to the physical I/O at the very spot in the program where they are encountered.
Process Image Inputs and Process Image Outputs are read from and written to the physical I/O at the beginning of the scan.
There isn't really anything more to it than that... other than you can have multiple Process Images in some CPUs, but that's a bit more advanced than the question of this thread.