2/10/2016 9:36 AM | |
Joined: 4/28/2015 Last visit: 4/19/2025 Posts: 10876 Rating:
|
Hello, look at this: |
With best regards... |
|
2/10/2016 10:00 AM | |
Posts: 6 Rating:
|
Something easier isn't? |
2/10/2016 7:43 PM | |
Posts: 5225 Rating:
|
The CountOfElements instruction does work. - Create an FC / FB in SCL language. - Output the count - Call the block in OB1 .. link an array (ex. "myDB".myArray) to the parameter (myVariant) .. link a UDINT variable to the output parameter (size) See also some example usage: |
Last edited by: William_B at: 2/10/2016 7:56:13 PMadd in-line picture |
|
This contribution was helpful to
7 thankful Users |
2/10/2016 10:06 PM | |
Joined: 7/7/2010 Last visit: 9/5/2025 Posts: 16061 Rating:
|
CountOfElements is s7-1500 only. Only thing to do is to trick portal into loop through the array until it goes outside the bounds and trigger an error (ENO toggles off on error), and detect it, grab the count.
|
science guy |
|
This contribution was helpful to
1 thankful Users |
Follow us on