plc.myforum.ro Forum Index plc.myforum.ro
PLCs users www.plc.myforum.ro!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Timer problems in TIA V13

 
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Simatic Automation Systems
View previous topic :: View next topic  
Author Message
univer
Junior
Junior


Joined: 20 Dec 2013
Posts: 3

PostPosted: 16/06/2014 11:47    Post subject: Timer problems in TIA V13 Reply with quote

Hello

I have a problem using function I made in TIA v12 inside TIA v13.
In v12 I created a simple SCL function named SetTimeTP which looks like this:
[url=http://oi61.tinypic.com/10x9e6w.jpg]v12 Function[/url]
and a data block from where to chose timer when function is called:
[url=http://oi58.tinypic.com/spaf0g.jpg]v12 DB[/url]

With that I could easily set and test timer:
Code:
//Set time
"SetTimeTP"(tNo := "Tmr".TMR_1, IntervalT := #delay);

//Test timer status
"Tmr".TMR_1.Q

Now in v13 this is not acceptable, I can create everything the same but I get this error inside SetTimeTP function:
[url=http://oi61.tinypic.com/2n1rvx3.jpg]v13 Function[/url]
Everything seems to be OK, it accepts #tNo of type TP_TIME as input, but it looks like the syntax should be different even though it accepts it as I write it, but when I make a semicolon it marks it as error.

If anyone has any ideas of how to make it work please help.
I can use timers normally, but this functions seemed convenient and all the different timers could be stored in one data block.

I am not sure where to put this topic so I apologize if it's not in the right sub forum.


Last edited by univer on 22/06/2014 10:22; edited 1 time in total
Back to top
View user's profile Send private message
univer
Junior
Junior


Joined: 20 Dec 2013
Posts: 3

PostPosted: 21/06/2014 20:36    Post subject: Reply with quote

I've been playing a little with this today and I found a solution, it's ridiculously simple.

Admin/moderator can now delete this topic if he wants to.
Back to top
View user's profile Send private message
duckman
Member
Member


Joined: 08 Jul 2013
Posts: 214

PostPosted: 22/06/2014 01:29    Post subject: Reply with quote

Please show your solution this problem
Back to top
View user's profile Send private message
univer
Junior
Junior


Joined: 20 Dec 2013
Posts: 3

PostPosted: 22/06/2014 09:34    Post subject: Reply with quote

You just have to move #tNo (data type TP_TIME) from Inputs to InOut inside the function.

...


Last edited by univer on 21/02/2015 18:37; edited 1 time in total
Back to top
View user's profile Send private message
duckman
Member
Member


Joined: 08 Jul 2013
Posts: 214

PostPosted: 22/06/2014 10:22    Post subject: Reply with quote

Thank you for passing on your experience.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    plc.myforum.ro Forum Index -> Simatic Automation Systems All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Fa-ti si tu propriul forum GRATUIT, pe www.myforum.ro