Programmable Logic Controllers aren’t only used to provide information on signal levels. They can also capture and analyze data, depending on the use of the controller. The most basic use of PLCs, signal capturing, allows users to capture and record a set of values for analysis and testing.
Values captured by PLCs can be entered and displayed on charts to see the frequency and variations in the actual value set compared to the ideal value set. Some value sets will need a PID control scheme to correct them. This is shown via spikes in the chart representing errors such as overshoot or under-performance.
Using ladder-logic code, sample spikes or pulses similar to those caused by errors can be created for testing. There are four different ways to create these sample pulses using logic-ladder codes. Each of these codes reflects the logic codes including comparisons, timing, and mathematical code.
The first method involves a first-in-first-out instruction to create the sample pulses. The FIFO load instruction is available in most of the expensive processors and simply increasing the size of the array to allow it to capture more values. This allows a larger sample of data to be taken for analysis.
This method, commonly found in the higher-end PLCs, takes the averages of all elements in an array. If the rate of change between consecutive captures needs to be calculated, then a code that compares the signal captures is used to determine the differences. An array can then read the result for analysis and capture any spiked values that were observed.
The third method eliminates the need for a FIFO instruction; however, array and file movement capabilities are still required. Nine elements are moved by the first instruction, copying the current signal value into the most recent element. Each movement instruction is then replaced with Vxxx entries, with one value in each entry representing the desired data locations of sensor value and storage location.
The last method works across almost any PLC platform, not just the high-end ones. It involves using a timer to record the scan and capture the values given during that time. The code’s resulting pulses won’t be as precise in the scan as it would in the above methods, but a cyclic routine or interrupt can resolve this issue.
When signals are being analyzed, it is good to capture signals at high frequencies. The speed at which the card posts a value to a register can only go so quickly. However, the only way to determine the update rate is by capturing and storing a large number of values in an array. For instance, if the capture rate of six or seven consecutive, identical values is 5ms, the card would update every 30 to 35ms. The faster values are posted, the higher the chance of a spike or error occurring.
It isn't hard to see how important ladder logic is, as it forms the backbone of PLC data collection and analysis. This collection and analysis in turn provides valuable information for industrial controls in use across the globe today. Understanding the different signal capturing methods that use ladder logic is critical to understanding and using PLCs to analyze data.
Our PLC technicians here at PanelShop.com are experts in their fields, and their scanning mentality is practically unmatched. To discover what improvements your company can make to increase your efficiency, talk to a PanelShop specialist today!