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

OK. You guys helped me out a bunch with my first Siemens question. I found a bunch of issues with integrity checking the PLC programs I was...
Replies
3
Views
124
Hi, I have a 1214 on ip 192.168.0.100. This is connected to other modules through a switch on same network. I need to connect this to a company...
Replies
1
Views
97
Hello. I appreciate the insights here and the willingness to share. I've got a lot of Rockwell experience, but my Siemens experience is...
Replies
6
Views
135
Kindly, has anyone tried to control Lenze servomotors with Siemens S120 drives ? Any special hints ? Have some concerns for the resolver and servo...
Replies
5
Views
182
Hi everyone, I want to upload the program from my CPU317TF-2 DP to my PC via connecting to CP 343-1 Advanced since it has LAN ports and the CPU...
Replies
1
Views
123
Back
Top Bottom