how can i get/set more values by one FB CLIENT_1 in OPC DA [message #1835943] |
Thu, 17 December 2020 02:43 |
dachao xu Messages: 4 Registered: December 2020 |
Junior Member |
|
|
Hi,
environment: forte: 1.8.4, 4diac ide: 1.11.2
I am following the doc "OPC DA": https://www.eclipse.org/4diac/en_help.php?helppage=html/communication/opc.html,
especially, "fbInputItems/fbOutputItems: items to be added, items should be separated with a comma"
so I use the FB CLIENT_1,
set the ID as: opc[127.0.0.1:opcserversim.Instance.1:2000:0.01:T1,T2,T3:Q1,Q2,Q3]
set the SD_1 as: REAL#11,REAL#22,REAL#33
But the result I observed in OPC simulation server is: the item T1 was set to 11, but the other two items T2 and T3 was set to 0, not 22 and 33. Have you ever tested this function?
Thanks
|
|
|
Re: how can i get/set more values by one FB CLIENT_1 in OPC DA [message #1835953 is a reply to message #1835943] |
Thu, 17 December 2020 07:29 |
|
You need one input per data value you want to send. So with an CLIENT_1 you will only send 1 value. This is exactly the behavior that you are observing. In order to send and receive 3 values you need a CLIENT_3 FB. You can easily get such an FB by copy pasting the CLIENT_1 to CLIENT_3 and add the additional SD inputs and RD outputs. Don't forget the withs. Then you can already use it in your application, no code generation is needed.
I know that that process is not perfect. We want to have dynamically adjustable interfaces in 4diac IDE. I hope to find time in one of the next release cycles to implement it.
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05210 seconds