Sign in to follow this  
Followers 0
Traloch

STEP7 Professional V13; FB Declaration Static: Data type TON is not allowed here

2 posts in this topic

Product:             STEP7 Professional V13

Reference:           FB Declaration Static: Data type TON is not allowed here

Description:

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Hi,

I'm using Step7 Prof V13 SP1 upd7 & WinCC Adv V13 SP1 upd7. 

 

In my project I'm using a 312CPU, Article No.: 6ES7 312-1AE14-0AB0, Version: V3.3 & TP1500 Comfort, Article No.:6AV2 124-0QC02-0AX0, Version:13.0.1.0

 

My Issue:

I've taken previously used FB from my Global library and inserted it into my new Project. In this FB I've declared an IEC Timer (TON) in the static section of the FB. When I go to upload to the PLC after TIA carries out the compilation I get error message 'Data type TON is not allowed here'. I've tried creating a new FB to test and had same issue for CTU,CTD,TOF.

 

See attached pics

This is really strange as it has always functioned before! Has anyone seen or heard of this issue before?

I'd appreciate any help, Cheers.

Compile_error_TON.png

Static_error_FB.png

Share this post


Link to post
Share on other sites

Not sure.  I created a FB and just dragged a TON statement into an empty rung from the toolbox on the right.  Told it to make it multi-instance and it compiled with no errors.  CPU is a IM154 ET200S but it should be the same as a 314.  I'll give it a shot with a 312 when i get a chance.

After that i could type in TON as a datatype and it was ok with it.  Maybe you just need to drag the first TON, CTU etc...  into the code to initialize the FB?

Good Luck.

multinst.JPG

ton.JPG

Edited by TravisPedley

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0