4/26/2016 2:46 PM | |
Posts: 36 Rating:
|
myArray Array[0..10] of Bool False True True True False arraySize UDInt 0 16 False True True True False I defined myArray of length 11. But length is coming 16 after using FC1(GetArraySize)-> #size := CountOfElements(IN := #getArray); OB1-> "GetArraySize"(getArray:="Data_block_1".myArray,size=>"Data_block_1".arraySize); ------------------------------------------------------------------------------------------ |
Last edited by: Min_Moderator at: 4/27/2016 10:06:27 AMNew subject after splitting |
|
4/29/2016 9:01 AM | |
Posts: 36 Rating:
|
I tried like this. But looks not possible for 1500 PLC. Invalid Assignment Error is coming. |
4/29/2016 9:14 AM | |
Joined: 7/22/2008 Last visit: 4/14/2022 Posts: 1879 Rating:
|
RIP |
Last edited by: 1test at: 6/8/2016 9:22:31 AM~(‾▿‾)~ |
|
4/29/2016 10:45 AM | |
Posts: 84 Rating:
|
Hi, If you use CountOfElements function to get the number of elements of an array of bool, the fill elements are also included in the count. (For example, 8 is returned for an ARRAY[0..1] of BOOL). Regards |
4/29/2016 12:47 PM | |
Joined: 8/21/2014 Last visit: 9/10/2025 Posts: 1087 Rating:
|
New question published by ossa is split to a separate thread with the subject Using the ANY pointers. Best regards |
Last edited by: Min_Moderator at: 4/29/2016 2:02:02 PMEdit link My Forum is the place to personalize your profile, |
|
Follow us on