I would like to create an array in an ST language subroutine, which I am not familiar with.
A priori you have to use the ARRAY function.
This would be a 2 column table of 24 rows.
The 1st column would record times, the second an INT or WORD value.
The collection would be triggered from a top (BOOL) from a subroutine.
Thank you for your help...!
An array only consists of data of the same type.
To mix data types you need to create an array of struture. In this structure you can mix data types.
For example :
Define a structure in the tab Data type:
TYPE MyStruct :
Define an array, for example in Glabal data :
MyTab:ARRAY[1..24] OF MyStruct;
Nota : You can define your array from 0 to 23 or from 1 to 24 (or from what number you want !)
And you can use it, for example in the PLC_PRG :
Hope to have been useful to you.
Log in to post a comment.