Strange behaviour with CNDR block
-
Hello,
I have 2 CNDR blocks that are configured the same and receive nearly the same input. However, one at some point now outputs 0 while the other still works as expected.
This may have happened after the input value (from a tank that was filled to capacity) was at 100%, possibly exceeding 19.5 (mA from a 4-20 mA sensor). Before that, both blocks worked well.
The only thing that i noticed is that n is set to 12 while there are only 11 pairs but that does not explain why the CNDR blocks behave differently.
In the same task, there are other CNDR blocks (for different tanks) that are all working as expected.
CNDR26_3
input u: 16.027
output y: 2157.79CNDR26_4
input u: 16.12
output y: 0Block configuration from mdl file:
Block {
BlockType Reference
Name "CNDR26_3"
Ports [1, 2, 0, 0, 0]
Position [885, 3728, 915, 3752]
SourceBlock "analoglib/CNDR"
n 12
SATF on
up "[ 00.0 01.5 03.5 05.5 07.5 09.5 11.5 13.5 15.5 "
"17.5 19.5]\n"
yp "[ 0 183 403 647 910 1188 1476 1772 2075 2385 28"
"65]\n"
FontSize 10
#GUID 964d76ea-d8e2-45f0-a78e-21c1e06a887c
}
Block {
BlockType Reference
Name "CNDR26_4"
Ports [1, 2, 0, 0, 0]
Position [885, 3768, 915, 3792]
SourceBlock "analoglib/CNDR"
n 12
SATF on
up "[ 00.0 01.5 03.5 05.5 07.5 09.5 11.5 13.5 15.5 "
"17.5 19.5]\n"
yp "[ 0 183 403 647 910 1188 1476 1772 2075 2385 28"
"65]\n"
FontSize 10
#GUID 283035dd-135a-4eb9-b58f-b7d97c0258a4
}System: Wago PFC-200.
I'm trying not to reset the system as long as possible to make sure a small issue with REST is fixed.Cheers,
Richard -
Hi Richard,
thanks for reporting the issue. The problem is that up and yp arrays should have n items but your up array has only 11 items, yp 12 items. Please, fix it so they all have same length and it will work well.
We have already implemented array length checking for those parameters and it won't compile unless all lengths are correct. The fix will be part of new release.
Thank you for understanding.
Cheers, Tomas
-
Hi Tomas,
The last number in the yp parameter is 2865 (this is straight from the mdl file that seems to limit line lenghts to 80).
The values below are copied from the block properties in Rexygen Studio:
[ 00.0 01.5 03.5 05.5 07.5 09.5 11.5 13.5 15.5 17.5 19.5]
[ 0 183 403 647 910 1188 1476 1772 2075 2385 2865]
There is a space before the first pair, but i count 11 in both.
Cheers,
RIchard -
Hi Richard,
sorry, my mistake. You are right - both arrays have 11 items.
But still the size need to comply with parameter n. Once you change it to 11 it should do the trick.Please, let me know.
Cheers, Tomas