- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
Link copied. Please paste this link to share this article on your social media post.
Posted: 2020-12-30 08:43 AM
Determine M580/M340 from with its program
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?
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Tags:
- english
Link copied. Please paste this link to share this article on your social media post.

