Accessing variables in DFB Schneider Electric/Unity Pro

abishur

Member
Join Date
May 2012
Location
Texas
Posts
47
I've used Schneider Electric and Unity Pro for a long time and have always assigned a variable external to the DFB and then assigned that external variable a modbus address.

Is there a way to assign a modbus address to a variable inside a DFB or assign the DFB itself a modbus address? I know I could create a DDT to hold all the variables I want to give a modbus address to, but that would make troubleshooting the code difficult as I wouldn't be able to see the values live in the code sections, I'd have to initialize an animation table on the DDT.
 
On old P57 platforms there was put4x and get4x blocks for addressing variable on code.

M340/580 don't support them.
If you only need to monitor values, you can use DDT-type for FBD.

Code also another FBD, which decodes your DDT-variables to Outputs of DFB. You should see variable values on outputs on program side, even that there is no variables linked to outputs of DFB.



If you use in/out variable for DDT and decoded DDT-variables, you can on program side copy from DDT to single variables or vice versa. But You should look which side has newest value before copy, and decide copy direction between variables.

That way code you could change values from DDT or even from separate variables o_O
 
Last edited:
On old P57 platforms there was put4x and get4x blocks for addressing variable on code.

M340/580 don't support them.
If you only need to monitor values, you can use DDT-type for FBD.

Code also another FBD, which decodes your DDT-variables to Outputs of DFB. You should see variable values on outputs on program side, even that there is no variables linked to outputs of DFB.

Thanks Lare your suggestion led me to an obvious solution. I made my DDT and then just assigned the DDT values to the IO pins of my FBD.

So for example, I made an DDT and then created instance called AI1 and it has a member name input. So on my FDB where it has a pin called Input I assigned AI1.input. Now I can give the DDT instance a starting address and it will automatically assign the rest an appropriate address and I can see their values.
 

Similar Topics

I've got to add a few screens to an existing WinCc project. It's five or six years since I last worked with WinCC and I'm having trouble accessing...
Replies
5
Views
7,187
For the past few day, I have had problems accessing the Rockwell Knowledgebase. When I try to access it (and I do have a TechConnect Support...
Replies
7
Views
371
Hi, Small issue i've really been beating myself up over today. I've been working with Panelview panels for years. Currently working on an older...
Replies
1
Views
575
Dear experts, I have the following setup: CPU-313C (6ES7313-5BF03-0AB0 V2.6) + CP343-1 (6GK7343-1EX30-0XE0 V2.0) communicating with Siemens PC...
Replies
7
Views
2,634
I'm looking to replace an AB PanelView 600 2711-K6C2 HMI with a C-more EA9-T10WCL. The PLC in the system is a SLC 5/03, which is staying. I...
Replies
2
Views
1,231
Back
Top Bottom