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 to do multidimensional array calculation ?
How to do multidimensional array calculation ? [message #1822858] Mon, 16 March 2020 04:08 Go to next message
ardianto vn is currently offline ardianto vnFriend
Messages: 31
Registered: May 2019
Member
Hi...
I want to ask 2 questions:
1. I want to calculate something like this:
A=
|1 2|
|3 4|

B=
|2|
|2|
C=A*B

expected result:
C
|6 |
|14|

How to code this operation in 4DIAC?

2. Is it possible to pass a function into a function? What I want to do is similar to the explanation on this page : passing function in python

Thank you
Re: How to do multidimensional array calculation ? [message #1822886 is a reply to message #1822858] Mon, 16 March 2020 11:32 Go to previous messageGo to next message
Alois Zoitl is currently offline Alois ZoitlFriend
Messages: 1036
Registered: January 2014
Senior Member
we currently relay for such code mostly on structured text. here you would need to define multi-demensional arrays. Which is in 4diac possible but currently not very user friendly. the you need to write your own loops to perform the operation. i was discussing with some people on a conept of function libraries. however the standard does currently not allow it. the same holds for your second question.
Re: How to do multidimensional array calculation ? [message #1823199 is a reply to message #1822886] Sun, 22 March 2020 09:39 Go to previous message
ardianto vn is currently offline ardianto vnFriend
Messages: 31
Registered: May 2019
Member
Thank you for the answer...
Previous Topic:Cmake with freertos
Next Topic:Problems to compile FORTE+Modbus
Goto Forum:
  


Current Time: Tue Oct 20 03:47:31 GMT 2020

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

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

Back to the top