Modicon PAC Forum
A forum for topics related to the scope of Modicon PAC offers and ecosystem along the whole lifecycle: Modicon M580 and 340, EcoStruxure Control Expert, EcoStruxure Process Expert (Unity Pro) and more.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2024-02-05 09:53 AM
Hi!
Since the DTM browser does not allow any change inside a modbus device request without a offline build I tried to find a nicer way around that and having the scanned variables named and changeable without a offline build.
I tried to make my own struct with an INT with bit rank naming for my variables/IOs and somehow tie them to the default/automatically generated scanned variable(s) of the scanner. But I fails because a struct can not be an alias of an INT for example even if the struct in turn contains an INT too 😞
I previously copied data from the scanner variables into my own variables using some ST but I'm not really happy with that solution either, not pretty, extra work coding, extra work maintaining and a source of possible human mistakes 😞
Does someone know a better way to create variable names for scanned variables while still allowing them to be modified without offline build all the time?
I have also previously posted a feature request regarding this here:
M580 DTM browser - allow changes online - Schneider Electric Community
And it was accepted as scheduled for ESCE v17, however I suspect that the answer meant that this feature will be available only for the next generation remote IO mentioned, not for the generic modbus DTM so I feel this issue will probably persists even with ESCE v17 😞
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: 2024-02-07 08:21 PM
The incoming raw data is a byte array. Use the generic Modbus DTM, then use EXTRACT block to take the byte array and overlay on top of your structured variable, making sure to match the size of source and destination data. You could do this inside a DFB for VSDs, Advantys I/O, Weidmuller I/O etc. This is a well established practice (here at least). There is no need to do anything clever inside the DTM browser other than where and how many words to read/write.
PS. We always use the generic DTMs unless there is no other choice.
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: 2024-03-05 10:42 PM
Hi! Thanks for this! I had no idea about this FB. I started using this method and found it way superior way of working with variable/IO names than using the DTM browser for that. The only things a bit annoying with it is that EXTRACT is a bit picky about the data sizes to you have to keep that in mind when making changes to size of SRC/DST structures so this is one more thing to be careful about or you may suddenly have something else than 0 at ERR and IO is stops working completely. And the other thing it is not very user friendly with byte counting when we are so used to everything else is done in 16 bit but I think I can live with that 🙂
And one last thing when working with DDT in general is of course this workaround https://www.youtube.com/watch?v=XPjjP_lwfhw which in my opinion silly and unnecessary extra step for doing certain DDT operations. It just feels a bit scary unattaching hundreds of variable names and the little thought that comes in the back of your mind that saying "is everything connected back correctly to where is was before?" hehe 😛
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.