Siemens IB to QB transfers

bdb1324

Member
Join Date
Jul 2019
Location
b
Posts
16
In Siemens s7-300 are IB and QB calls internal bytes or would QB17 overwrite Q17.0 through Q17.7 ect?
 
QB17 would overwrite Q17.0 through Q17.7.



Similarly, QD16 would overwrite QB16-QB19 (which would be Q16.0-Q19.7 or QW16-QW18).
 
Thank you that clears up a lot for me. So another example B#16#3F is in hex when it gets transferred to QB17 will it be in binary form or decimal or hex?
 
Bin vs Hex vs Dec is just how you view the number. It's all the same to the PLC. You pick how you view it, just like you can in the windows calculator.
 
I guess what I meant was will it store it as

qb17 0 0 0 0 0 0 0 3F

qb17 0 0 0 0 0 0 0 63

qb17 0 0 1 1 1 1 1 1
 
I am perplexed by this QB is the same. i.e. Bit Q 0.0 is the first bit of QB0 so why would you transfer it, on the other hand transferring a IB to QB will overwrite the QB with the exact data in IB. If you are talking about I/O refresh then PIB (the actual real Input Image) transferred to IB will update the internal image at that period in time, The real input image is transferred to the internal image outside the normal scan of the code (Dependant on type of PLC) i.e. Before or after code scan the input/output image is updated. If the program scan is 100ms then the Images will be updated every 100ms, however calling a block that updates the I/O image (L PIB 10 T IB 10) will update it immediately, There can be various ways to update, Calling the update function in an interrupt or by calling the FB many times in OB1 between calls to other blocks. Calling it in interrupt will update either in I/O interrupt (update when real inputs change) or if say scan of PLC is 100ms calling the block many times in OB1 will update in the following manner
OB1 total scan of PLC 100ms
JU PB X (5ms)
JU FB Update
JU PB y (10ms)
JU FB Update
JU PB Z (15ms)
JU FB Update
Would update the image after 5ms, 10ms & 15ms etc.
 
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.
 
Thanks everyone for the comments that was a huge help. The program calls FC41 to measure the width of a plate for blasting and painting. Once that is done the program uses a transfer from IB9 to QB17 if the plate is between a certain width if not the program transfers B#16#3F to QB17. Reason for the questions.

FC41 only gets called when the plate is at a certain position on the conveyor.

Thanks for all the information. They are transferring it to an Allen Bradley PLC and I am trying to understand what the Siemens PLC was doing. So very much appreciated.
 
According to Siemens FC41 is a communication block (FTP) as standard, however it can be changed to another FC number, If it is the original then there must be some communications going on. FC 41 is also reported to be a PID (which if I remember correctly I have used). If you can open it, it may be that it is one created by the programmer. It seems a bit confusing to me. It sounds like they are not using interrupts for counting purposes (unless it is done elsewhere) but are transferring the data to outputs like some parallel interface i.e. a value that represents the size.
 

Similar Topics

Hello everyone, I've had this issue for the last 2 days where I try to assign the profisafe address to an IO block (6ES7 146-6FF00-0AB0) but when...
Replies
3
Views
55
Hello, good morning, I have been having two problems with the Tia Portal software. The first is that I have installed it on my computer and...
Replies
2
Views
78
Hello to all, I'm just starting with using CodeSys. Immediately, I have noticed that Codesys doesn't use data blocks like for example S7 does...
Replies
11
Views
161
Hi, I'm setting up a modbus master on an S7-300. It seems to work in OB1 but not when I use it in OB35. Does anyone have any ideas why? Could...
Replies
10
Views
110
The past week we received a new piece of equipment from Germany which utilizes siemens controls. Typically in our company we use A.B. controls for...
Replies
12
Views
330
Back
Top Bottom