Skip to main content



      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 00:08 Go to next message
Eclipse UserFriend
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 07:32 Go to previous messageGo to next message
Eclipse UserFriend
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 05:39 Go to previous message
Eclipse UserFriend
Thank you for the answer...
Previous Topic:4Diac Forte and STM32
Next Topic:Problems to compile FORTE+Modbus
Goto Forum:
  


Current Time: Mon Jul 14 06:38:18 EDT 2025

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

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

Back to the top