CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Sun Feb 16, 2020 11:14 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Feb 14, 2020 3:23 pm 
Offline

Joined: Mon Feb 03, 2020 10:44 am
Posts: 1
Hello everybody.
I'm converting a Codesys V3 project in structured text to another project in V2.3 (due hardware old not compatible with V3).

Usually, in the declaration of the variables, I initialize the desidered value:

VAR_GLOBAL CONSTANT
baseTick : BYTE := 20;

cmdDelay : UINT := 700 / baseTick;
shortCmdDelay : UINT := 100 / baseTick;
alrOnDelay : UINT := 2 * (1000 / basetick);
alrOffDelay : UINT := 500 / baseTick;
END_VAR

In Codesys V3... no problem, it works!
In Codesys V2.3 I can't use a mathematical operation!

Works only:
cmdDelay : UINT := 35;
or
cmdDelay : UINT := baseTick;

I tryed :
cmdDelay : UINT := 700 / baseTick;
cmdDelay : UINT := (700 / baseTick);
but always with build errors.

Have you some ideas?

Thank you!
Andrea


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 1 post ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Limited