Hi all,
I'm designing UDTs for a RSlogix 5000 project and I would like your valuable comments about this topic.
I have around 10 tanks to control. Some of them have a level sensor, some of them Low Level and High Level Switches. Some of them have a steam valve (ON/OFF) to heat the product. Some have a temperature sensor. Some have a discharge valve. Some a load valve. And so on...
The Add-On will check if the level is high or low, if the discharge valve needs to open according to the level and the temperature, if the steam valve needs to open, if the discharge pump needs to stop, etc.
One approach for the UDTs and Add-Ons is to create a specialized UDT and Add-On for each particular kind of tank. Let's say that there are like 6 different types of tanks. We wouldn't reuse much data structure and code here, but the data and code used will be more optimized.
The other "opposite" approach is to create a UDT that has everything and an Add-ON that does everything (with flags to tell if we are using level sensor or level switches, if there's a temperature sensor, if we are using a discharge valve, etc.). There will be just a "one size fits all" big UDT and a "do it all" big Add-On. There would be unused data and code here.
My questions are:
I'm designing UDTs for a RSlogix 5000 project and I would like your valuable comments about this topic.
I have around 10 tanks to control. Some of them have a level sensor, some of them Low Level and High Level Switches. Some of them have a steam valve (ON/OFF) to heat the product. Some have a temperature sensor. Some have a discharge valve. Some a load valve. And so on...
The Add-On will check if the level is high or low, if the discharge valve needs to open according to the level and the temperature, if the steam valve needs to open, if the discharge pump needs to stop, etc.
One approach for the UDTs and Add-Ons is to create a specialized UDT and Add-On for each particular kind of tank. Let's say that there are like 6 different types of tanks. We wouldn't reuse much data structure and code here, but the data and code used will be more optimized.
The other "opposite" approach is to create a UDT that has everything and an Add-ON that does everything (with flags to tell if we are using level sensor or level switches, if there's a temperature sensor, if we are using a discharge valve, etc.). There will be just a "one size fits all" big UDT and a "do it all" big Add-On. There would be unused data and code here.
My questions are:
- Any real world experiences using a big UDT and Add-On?
- How much it would affect the PLC perfomance using big generic UDTs and Add-Ons?
- Do you think that the code would be unnecessarily lengthy and the UDT too comprehensive?