In the continuous task, all logic within a PLC is executed in order, rung by rung. Therefore, any CPU time not allocated to other operations, such as motion or communication, will be used to process the programs within the continuous task. A project will, by default, contain a continuous task running in the background. In RSLogix 5000, logic is executed based on tasks and events. Understanding Continuous Tasks in RSLogix 5000 Which type of task would be best suited to our indexing table example? That’s what we’re going to look at in this tutorial. One way to overcome this issue is using a different task type. This could be detrimental to our machine. This would mean that our indexing table might stop short or overshoot our dwell flag. For example, one scan to the next could be longer or shorter than the last. Imagine using the main PLC task with various processes and calculations. At the falling edge of the dwell flag, a timer could be started, and once the timer has expired, a virtual stop command can be sent to the PLC to stop and decelerate the table, allowing it to come to rest on the dwell flag. Another way to achieve the same result is to start indexing the table. When the table rotates to this flag, it will command the PLC to stop and decelerate the table allowing it to come to rest on the dwell flag again. At a certain point, fixed to the spindle of the indexer sits a stop flag. As the indexing table rotates, it moves off of the dwell flag. For example, a traditional setup might include both flags as inputs to the PLC. Given the advancements of PLCs these days with multicore processors, we can improve our scan times and, therefore, process information much more quickly.Īn example of this might be accurately timing a process such as an indexing table with a dwell flag but no stop flag. To be exact with a DINT which is what Logix 5000 uses for timers the longest you can time is.Ģ4 Days, 20 Hours, 31 Minutes, 23 Seconds, 647 Milliseconds.When writing code for fast automation processes, such as in the FMCG (Fast Moving Consumer Goods) sector, the processing speed of PLC logic can sometimes have significant implications. I did not read much into the application itself but recheck your math. This can all be done in the back ground every time. If the final weight is not within the dead band then calculate the difference and use that number to calculate the new gate close value. If the final weight is within the dead band no adjustment is necessary. You look at the final weight after the gate is closed and all material is on the scales. I have done it that way many times truck loading, batching systems never a problem and the operators don’t have to make any adjustments. If you feed rate is constant and the distance from the gate to material in the truck is fairly constant the freefall should be constant. If the input is in seconds and multiply by 1000 to get ms presetīut why not calculate the free fall ( material still in motion in the air when the gate close command is sent) It is actually 49 days still a long time to run a timer Or compare result and inhibit below zero numbers on int and dint numbers. If you are using UINTS and UDINT data types, then values are allways positive numbers.Ġ to 65535 or 0 to 4294967295 range and it is inpossible that you get negative number anymore. It is from DINT (Signed Dint) data type, it is data values -2147483647 to +2147483647, if you add any number above +2147483647, result will go to negative number as 32bit is sign -/+. This is presuming your operators are using the HMI and not some other source of input that doesn't get filtered out by the HMI. I would believe that your negative value is a result of your math function. I think this is caused by the math function value being too big for the register its being put into. If you make two dints, put the max value the dint will hold (2147483647) and add those two dints together you will get -2 as an output. I have since always done a GEQ to 1 comparison on all math functions that adjust timer presets. Long story short, his word of advice is "if your going to use a math function to figure out your preset you need to validate its value before you move it to the preset". The old timer was giving me huge details about it, but I was young and knew everything. I was told one time, many years ago that some math functions can put things in a negative value.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |