Counter in Tia Portal software

533 views Asked by At

I have an issue with a counter in the Tia portal software.

When I hover over the CV, it says you can insert Int, DInt, SInt UInt, USint, UDint.

I want to insert a Dint value because the number can be bigger than 32767.

But when I do this, it still stops at 32767.

How is this possible?

I got the following code

my code

V2.DI_BatchProduction is a DInt. (int32)

So why does it stops at 32767? (the max value of a int16)

2

There are 2 answers

0
Bart88 On

Ok it seems you can tell the counter what kind of counter it is. when you click on the name of the counter you get a dropdown and you can select what kind of counter it is (see image below)

example changing counter

pretty strange this isn't changed automatically on the output.

0
MrEngineer On

Just check it out. When you declare a counter you have to put the type of counter in the Data type. In your case it would be : Normally you it would also work as @Bart88 proposed.

Declaration of a counter