Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » 4DIAC - Framework for Distributed Industrial Automation and Control » how can i get/set more values by one FB CLIENT_1 in OPC DA
how can i get/set more values by one FB CLIENT_1 in OPC DA [message #1835943] Thu, 17 December 2020 02:43 Go to next message
dachao xu is currently offline dachao xuFriend
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 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

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.
Re: how can i get/set more values by one FB CLIENT_1 in OPC DA [message #1835967 is a reply to message #1835953] Thu, 17 December 2020 11:03 Go to previous messageGo to next message
dachao xu is currently offline dachao xuFriend
Messages: 4
Registered: December 2020
Junior Member
Hi,
Thanks for your reply.
in 4diac ide 1.11.2 i can't find the way to add the additional SD inputs and RD outputs.


Thanks.
Re: how can i get/set more values by one FB CLIENT_1 in OPC DA [message #1835968 is a reply to message #1835967] Thu, 17 December 2020 11:07 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

You need to do this in the type editor for your new CLIENT_3 FB type.
Re: how can i get/set more values by one FB CLIENT_1 in OPC DA [message #1836001 is a reply to message #1835968] Fri, 18 December 2020 03:32 Go to previous messageGo to next message
dachao xu is currently offline dachao xuFriend
Messages: 4
Registered: December 2020
Junior Member
Hi,
Your method is very effective. I can get any number of values now. thank you very much.


Regards
dachao xu
Re: how can i get/set more values by one FB CLIENT_1 in OPC DA [message #1836017 is a reply to message #1836001] Fri, 18 December 2020 10:05 Go to previous message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1585
Registered: January 2014
Senior Member

Happy to hear that!
Previous Topic:Bachmann M1 / VxWorks - Need advice how to begin
Next Topic:How to subscribe or publish with OPC DA?
Goto Forum:
  


Current Time: Fri Apr 26 15:50:59 GMT 2024

Powered by FUDForum. Page generated in 0.03845 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top