CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Fri Jul 21, 2017 11:31 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Apr 21, 2016 9:07 am 
Offline

Joined: Mon Nov 01, 2010 4:30 pm
Posts: 52
Hi,

in Codesys v.2 help there is a warning that string functions are not thread safe and the same function shouldn't be used in different tasks because there is a danger of overwriting.

My question is, does this apply to all string functions - including LEN and FIND, which return INT - or only to the rest (LEFT, CONCAT etc.) that return STRING ? Can I safely use LEN and FIND from different tasks or they may return a wrong number?

Thanks.

--
BTW is it possible a task switching to occur while a function executes, if there are no tasks triggered by events?


Top
   
PostPosted: Fri Apr 22, 2016 7:00 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 974
dont worry to much.
it indeed has to do with interupts etc. However just dont change a string in a interupt.
when doing a for next loop it can be interupted. but if you have no interupts running it is no problem, as a function is completed (or a rung is done, however multilines are not obvious)

_________________
shooter@home.nl
computer shooter
paul deelen
jacob van wassenaerstraat 29
NL 5224 GG 's-Hertogenbosch
skype shooter paul.deelen
phone +31736139136


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

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 2 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