Industry Automation and Control Forum
This forum is addressing industrial automation design & engineering, operations, asset performance, cyber security and digital transformation for Plants & Machines.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-12-30 08:43 AM
I want to create a DFB that can be used on either a M580 or M340 using a READ_VAR. The M580 uses the ADDMX, while the M340 uses the ADDM. Is there a way for the DFB to determine its processor so that it can call the correct function?
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-04 07:29 PM
I'm thinking of a simple solution for you.
In your creation of DFB, create a BOOLEAN input pin to determine M580 or M340, e.g. Logical 0 = M580; Logical 1 = M340.
When a PLC programmer instantiate a DFB, he/she just need to setup a value to this input pin, logical 0 or 1.
Hopefully this solution is fine for you.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-05 07:33 AM
Actually, there is no need. The ADDM works in both the M340 and M580; that's why it shows up in both libraries. ADDMX is used for addressing at a serial link module port. Check Control Expert Help. It will show you the use cases.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-04 07:29 PM
I'm thinking of a simple solution for you.
In your creation of DFB, create a BOOLEAN input pin to determine M580 or M340, e.g. Logical 0 = M580; Logical 1 = M340.
When a PLC programmer instantiate a DFB, he/she just need to setup a value to this input pin, logical 0 or 1.
Hopefully this solution is fine for you.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-05 02:43 AM
There are some status words that can also help with this.
%SW14 contains the commercial version of the processor.
%SW16 contains the internal firmware version number which is likely to be different between M340 and M580.
%SW146 and %SW147 contain the serial number of the SD card. The M340 requires a serial card but the M580 does not and will return zeros if there is not a card present. Obviously this method fails if your M580 has an SD card installed for logging data or other purpose.
These should give you what you want and a few other indicators for management of the program.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2021-01-05 07:33 AM
Actually, there is no need. The ADDM works in both the M340 and M580; that's why it shows up in both libraries. ADDMX is used for addressing at a serial link module port. Check Control Expert Help. It will show you the use cases.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.