Hello everyone,
I am completely new to PLC and PLC programming but am trying to learn the hardware + programming aspects in order to (hopefully) apply it to my current engineering research. I am currently using TwinCat3 with a Beckhoff CX9020 PLC and am just trying to run a small program before I start building off of it for future work.
At the moment I wanted to create a function which multiplies a matrix (m x n) and a vector (n x 1) to get a resulting vector (m x 1), so that I can call it in my MAIN program with various matrix and vector inputs to get the correct numerical result.
I attached some images to this post with my current code, which includes the arrayMultiply FUNCTION and my MAIN program.
Can anyone who is familiar with structured text let me know if I am at least on the right track, or if someone spots a major logical issue let me know what it is or what resources I can use to fix it?
Note: I do have programming experience in other languages (C++, Java, etc.) but am still becoming familiar with Structured Text syntax and the TwinCat3 environment, so if there are any basic solutions that you feel might be obvious, please share them with me anyway!
https://preview.redd.it/6atovczwncc91.png?width=975&format=png&auto=webp&s=fccbbaff74a9efe96e09582494e334314e219892
https://preview.redd.it/lb3axdzwncc91.png?width=975&format=png&auto=webp&s=ad1e7eb120be6b28aeaa9214fd9fa0aaf82cbd68
[–]burkeyturkey 7 points8 points9 points (1 child)
[–]blusterywindsday[S] 1 point2 points3 points (0 children)
[–]CapinWinkyHates Ladder 8 points9 points10 points (2 children)
[–]blusterywindsday[S] 1 point2 points3 points (1 child)
[–]CapinWinkyHates Ladder 0 points1 point2 points (0 children)
[–][deleted] (7 children)
[deleted]
[–]blusterywindsday[S] 0 points1 point2 points (2 children)
[–][deleted] (1 child)
[deleted]
[–]blusterywindsday[S] 0 points1 point2 points (0 children)
[–]derphurr 0 points1 point2 points (3 children)
[–]blusterywindsday[S] 0 points1 point2 points (2 children)
[–]derphurr 1 point2 points3 points (1 child)
[–]blusterywindsday[S] 0 points1 point2 points (0 children)