CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Thu Sep 20, 2018 10:59 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 2 posts ] 
Author Message
 Post subject: SysMemMove doesn't work?
PostPosted: Fri Dec 22, 2017 10:39 am 
Offline

Joined: Thu Dec 21, 2017 3:06 pm
Posts: 9
Hi, I am relative new in Codesys, but I have been working with Siemens for a long time.
I am trying to use the functions in SysLibMem.lib (especially SysMemMove) and the code working fine in (Simulation mode) with Codesys 3.5 but not at all in 2.3. I intend to do a FIFO, but this is only the basic function before I move on to the “FIFO-function” with offset and so on so to speak.
Is there any difference between these?

My code looks like this.

Code:
VAR
   sSourceString:   STRING;
    sDestString:   ARRAY [0..7] OF STRING;
   EdgeDetect:   R_TRIG;
   bInit:       BOOL;
END_VAR


EdgeDetect(cLK:=bInit);
IF EdgeDetect.Q THEN
   SysMemMove(dwDest:=ADR(sDestString),
   dwSrc:=ADR(sSourceString),
   dwCount:=SIZEOF(sSourceString));
END_IF


Regards BosseL


Top
   
PostPosted: Wed Jan 17, 2018 2:05 pm 
Offline

Joined: Thu Dec 21, 2017 3:06 pm
Posts: 9
It turns out that SysLib functions in Codesys 2.3 don't work in Simulation Mode. When I download this to a real HW-PLC it works fine.
I did the same test with SysGetProjectInfo, both Sim-mode (didn't work) and in a real PLC (works).


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 5 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