Question

The following compiles, but my program complains of an overflow error,

VAR
    PositionsAx1:  ARRAY[1..64] OF DINT  := [49500, 47703, 45906, 44109, 42312, 40516, 38719, 36922, 35125, 33329, 31532, 29735, 27938, 26142, 24345, 22548, 20751, 21834, 23037, 24240, 25443, 26646, 27848, 29051, 30254, 31457, 32660, 33863, 35065, 36268, 37471, 38674, 39877, 41080, 42282, 43485, 44688, 45891, 47094, 48297, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500, 49500];
END_VAR

There are 64 values in the array. From the scrappy documentation online I might have to declare a TYPE but I am not sure ...

Was it helpful?

Solution

The above is the correct way - the overflow was from something else.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top