Logix5000 RPI

Hi All

In Logix5000, RPI dictates when data is send to CPU from IO. So, it means neither inputs not outpus are read before scan/updated after scan.

1. Does the CPU take data straigth from its memory?
2. Are the data being read in real-time?
3. Does IO update this memory or CPU itself?

Thanks for help
 
I'm not quite 100% sure about the actual architecture, but I think that the IO updates are done by a seperate microprocessor. I do know that they're independent of all program tasks and that the IO data from the modules can and will change mid-scan. It's very possible for this to cause Weird Things it the same input is used on more than one place in the code. A lot of programmers who work with Logix 5000 PLCs will butter IO because of that.

Also note that the R in RPI means Requested, not guaranteed. High priority periodic tasks or a lot of communications can delay the IO updates.
 
So remove RPI from the equation for a moment...

When the scan reaches the end of a task, there is a step called Output Processing. At that point the data for all output tags is transferred to the physical output modules. This happens at the end of any task. Some tasks may allow you to skip this step. If I had a task performing a math calculation every 50ms and that task did not affect any real I/O then I might choose to skip output processing for that task. This is a configuration setting for each task. Ok, so outputs are automatically handled at the end of a task. Tag data gets transferred to the physical output modules.

Now, let's add RPI back into the mix. But, only for outputs right now. The RPI is the communication rate that tag data for outputs will be sent from the controller to the physical output modules. Ok, so if I have a module with a 10ms RPI, then I will be sending data to that output module every 10ms AND at the end of each task. So that's outputs...they update at the end of every task and at the RPI rate.

Now let's add in inputs. The physical input modules will send their data to the controller tags at the defined RPI rate. This is completely independent of the scan of the logic. They call this asynchronous update. There is no synchronizing of the scan with the updating of the modules. Some PLCs do have synchronized updates. For the 5000 family, Rockwell chose to allow the scan and the I/O update to be async so that each of these things can operate as fast as possible. In a synchronized scan if it takes 50ms to scan the logic then we can only read the I/O once every 50ms. An input could toggle on and off and we might miss it. With an async scan we can read the inputs as fast as we want and update the outputs as fast as we need no matter how long the scan takes. Of course we still need the logic to be able to respond to that input and there are tools available to be able to react faster than the scan would normally permit.

So if I have an input module with an RPI of 5ms but my task takes 20ms to execute once, then the data may be updated 3 or 4 times during a single scan. If I have a scan time of 1ms then I'm only getting new data approximately one time for every five scans.

There are tools and techniques we can use to make the 5000 controllers act like a sync system, as well as tools to take advantage of the async scan cycle.. But by default the 5000 controllers let each operation take place independently . There are pluses and minuses to each method (sync vs async). The key is that we can choose how to take advantage of that capability or configure things to force into into more synchronized operation if that's what we need.

1. Does the CPU take data straigth from its memory?
Data is stored in tags in the controller memory. So data gets sent to and from the physical I/O modules and the controller tags.

2. Are the data being read in real-time?
The data sent from an input module to the controller is a snapshot in time. The controller isn't reading the data directly from the input device. The data is detected/sensed by the input module, stored in it's own internal memory and then transferred to the controller at the RPI rate. The controller isn't reading the data on the input module. It is receiving data from the module. Output data is real time in the controller, it is a snapshot at the output module.

3. Does IO update this memory or CPU itself?
The CPU memory provides tags for storing data. The modules send data to those tags.

One last thing to consider. Output modules also send data to the controller at their RPI rate. For example, if an output module has electronic fusing, the status of the electronic fuse is considered an input. So at the RPI rate the output module would send input data to the controller. And, while it isn't as common, sometimes the controller will need to send data to an input module. This is usually just configuration changes. So an input module can also receive data just like an output module.

OG
 
ok, so if task priority affects output updates, what is its priority then?? is it a part of background tasks (overhead)? or something independent but with certain level of priority?
 
First off, I am repeatedly, overly focused on ControlLogix and sometimes forget about the differences in the CompactLogix. The older models of CompactLogix (those prior to the 5380 and 5480) had something called an I/O task. This doesn't exist on the ControlLogix and the newer models of CompactLogix.

Every task except for the Continuous task is assigned a priority. The programmer can choose the priority for each task. They are numbered from 1-15 with 1 being the highest priority and 15 the lowest. The Continuous task does not have a priority. You could think of it as 16 if you wish, but it really does not have any priority.

In the older CompactLogix models, the I/O task is a priority 6. You cannot change this priority. So any other task assigned 1-5 could interrupt or delay the I/O task. Any task 7-15 would be interrupted by the I/O task. So programmers needed to really think about assigning priority levels.

When you configure the RPI for your I/O modules, whatever the fastest RPI setting is for those modules, that becomes the trigger for the I/O task. So if you have five modules configured as 20ms RPI and one module configured as 5ms RPI, then the I/O task would execute every 5ms.

OG
 
So remove RPI from the equation for a moment...

When the scan reaches the end of a task, there is a step called Output Processing. At that point the data for all output tags is transferred to the physical output modules. This happens at the end of any task. Some tasks may allow you to skip this step. If I had a task performing a math calculation every 50ms and that task did not affect any real I/O then I might choose to skip output processing for that task. This is a configuration setting for each task. Ok, so outputs are automatically handled at the end of a task. Tag data gets transferred to the physical output modules.

Now, let's add RPI back into the mix. But, only for outputs right now. The RPI is the communication rate that tag data for outputs will be sent from the controller to the physical output modules. Ok, so if I have a module with a 10ms RPI, then I will be sending data to that output module every 10ms AND at the end of each task. So that's outputs...they update at the end of every task and at the RPI rate.

Now let's add in inputs. The physical input modules will send their data to the controller tags at the defined RPI rate. This is completely independent of the scan of the logic. They call this asynchronous update. There is no synchronizing of the scan with the updating of the modules. Some PLCs do have synchronized updates. For the 5000 family, Rockwell chose to allow the scan and the I/O update to be async so that each of these things can operate as fast as possible. In a synchronized scan if it takes 50ms to scan the logic then we can only read the I/O once every 50ms. An input could toggle on and off and we might miss it. With an async scan we can read the inputs as fast as we want and update the outputs as fast as we need no matter how long the scan takes. Of course we still need the logic to be able to respond to that input and there are tools available to be able to react faster than the scan would normally permit.

So if I have an input module with an RPI of 5ms but my task takes 20ms to execute once, then the data may be updated 3 or 4 times during a single scan. If I have a scan time of 1ms then I'm only getting new data approximately one time for every five scans.

There are tools and techniques we can use to make the 5000 controllers act like a sync system, as well as tools to take advantage of the async scan cycle.. But by default the 5000 controllers let each operation take place independently . There are pluses and minuses to each method (sync vs async). The key is that we can choose how to take advantage of that capability or configure things to force into into more synchronized operation if that's what we need.


Data is stored in tags in the controller memory. So data gets sent to and from the physical I/O modules and the controller tags.


The data sent from an input module to the controller is a snapshot in time. The controller isn't reading the data directly from the input device. The data is detected/sensed by the input module, stored in it's own internal memory and then transferred to the controller at the RPI rate. The controller isn't reading the data on the input module. It is receiving data from the module. Output data is real time in the controller, it is a snapshot at the output module.


The CPU memory provides tags for storing data. The modules send data to those tags.

One last thing to consider. Output modules also send data to the controller at their RPI rate. For example, if an output module has electronic fusing, the status of the electronic fuse is considered an input. So at the RPI rate the output module would send input data to the controller. And, while it isn't as common, sometimes the controller will need to send data to an input module. This is usually just configuration changes. So an input module can also receive data just like an output module.

OG
@Ghostopera
Thank you so much for clarifying the function of scanning and RPI. I have a question, if a machine RPI component is set to 50ms, what would be an ideally timing for a periodic task?
 
@Ghostopera
Thank you so much for clarifying the function of scanning and RPI. I have a question, if a machine RPI component is set to 50ms, what would be an ideally timing for a periodic task?
Typically you would look at how fast do you need to be able to detect an input signal, react, and set/reset an output. Then set the RPI and periodic rates to meet your needs.

There is no specific rule or formula for matching these two timing values. I usually try to get my input RPI to be anywhere from 2-5x faster than the periodic rate. But again, that is only a suggestion. My outputs will update at the end of the periodic task scan, but if I need the output to update faster than the scan time (not the periodic rate) of the periodic task, then I might set the RPI to be 2-3x faster than the scan rate. But remember, it would be the scan time that would ne the deciding factor here, not the periodic rate.

EDIT: I should probably mention there is a concern when the input RPI is faster than the scan time of a task (as I recommended above). That could mean that an input could change state part way through a single logic scan. You could look at input 1 on rung 1 and have logic that says if the input 1 is closed , trigger output 1. Then on rung 70, you could also look at input 1 and say if input 1 is open, turn on output 2. Both of those outputs could be triggered if the input changed state while the scan was between those two rungs.

This is one of the concerns in an asynchronous system. Programmers will sometimes get around this by writing what we call buffer logic that will prevent those mid scan changes from causing this issue.

OG
 
"This is one of the concerns in an asynchronous system. Programmers will sometimes get around this by writing what we call buffer logic that will prevent those mid scan changes from causing this issue."
This is why RMC motion controllers use synchronous scans using an FPGA and there are no coarse updates. The FPGA can read all of its inputs at the same time. Imagine a PLC that can read ALL of its inputs at once so there is no scan time, there is no need to buffer inputs or outputs. The user doesn't need to use interrupts because everything is done at scan times down to 250 microseconds. The RMCs use smooth 5th order motion profiles are generated whereas the old motion modules would get a coarse update and then generate fine updates using 2nd order interpolations between the coarse updates. If something had to change between coarse updates, then the system would need to wait until the PLC read the change and then posted the results on the next scan. I am not a fan of distributed I/O. There are little delays that make things difficult or limit high speed performance. Delta Motion now supports EtherCat but I still recommend using the I/O on the back plane for all high-speed/low latency applications.
 
Typically you would look at how fast do you need to be able to detect an input signal, react, and set/reset an output. Then set the RPI and periodic rates to meet your needs.

There is no specific rule or formula for matching these two timing values. I usually try to get my input RPI to be anywhere from 2-5x faster than the periodic rate. But again, that is only a suggestion. My outputs will update at the end of the periodic task scan, but if I need the output to update faster than the scan time (not the periodic rate) of the periodic task, then I might set the RPI to be 2-3x faster than the scan rate. But remember, it would be the scan time that would ne the deciding factor here, not the periodic rate.

EDIT: I should probably mention there is a concern when the input RPI is faster than the scan time of a task (as I recommended above). That could mean that an input could change state part way through a single logic scan. You could look at input 1 on rung 1 and have logic that says if the input 1 is closed , trigger output 1. Then on rung 70, you could also look at input 1 and say if input 1 is open, turn on output 2. Both of those outputs could be triggered if the input changed state while the scan was between those two rungs.

This is one of the concerns in an asynchronous system. Programmers will sometimes get around this by writing what we call buffer logic that will prevent those mid scan changes from causing this issue.

OG
@ Operaghost
Thank you sir for the time spent answering question!!! I really appreciate it.
 

Similar Topics

Hello, all. I have purchased a Raspberry Pi, and intend to use it something like a high speed counter (It hasn't arrived yet). At this point, I...
13
Replies
6,116
Views
Hi, We still have a couple of machines running version 13.04 which we are looking at a way of running on Windows 11. We currently have to use an...
4
Replies
240
Views
Dear Experts, I would appreciate your assistance in resolving an issue with RSLogix5000 v20,54. Our plant operates a redundant control system...
18
Replies
828
Views
Hi all, My client has an existing system running 1769-L32E/A based controls with PowerFlex 520 and 22COM Ethernet module. The task is to replace...
6
Replies
256
Views
Getting this messege while trying to open a file but I could open another file in another folder just fine
21
Replies
1,145
Views
Top