CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum
Deutsche Version English version russian version 
It is currently Thu Apr 27, 2017 7:53 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 3 posts ] 
Author Message
 Post subject: array
PostPosted: Fri Dec 16, 2016 5:09 pm 
Offline

Joined: Wed Jun 01, 2011 12:41 pm
Posts: 1
how can i delete tags in a array.
array [1 to 64]:words.
I only need the tags from [1..4] but not tag [5],[6] /11 12 /17 18 etc...
only first 4 words (word 5 en 6 not needed also to some for 11 12 etc until 64)

here a example put not correct programmed like it must be...
arraynew[1]:=arrayold[1]
arraynew[2]:=arrayold[2]
arraynew[3]:=arrayold[3]
arraynew[4]:=arrayold[4]
arraynew[5]:=arrayold[7]
arraynew[6]:=arrayold[8]
arraynew[7]:=arrayold[9]
arraynew[8]:=arrayold[10]


Top
   
 Post subject: Re: array
PostPosted: Sun Dec 18, 2016 2:50 pm 
Offline
Frequent User
Frequent User

Joined: Fri Sep 02, 2011 8:02 pm
Posts: 211
If you want to use ARRAY type, then you need to manually shift data yourself like:
Code:
Data[0] := Data[0];
Data[1] := Data[1];
...
Data[5] := Data[7];
Data[6] := Data[8];
...


It may be possible of course to use variables with a skip routine instead of hard coding...


Top
   
 Post subject: Re: array
PostPosted: Mon Dec 26, 2016 10:19 pm 
Offline
Frequent User
Frequent User

Joined: Thu Jun 14, 2007 9:49 am
Posts: 974
well stijn the program you made should work, (did you declare both arrays correct in the varaiable list?
what errors do you see?

_________________
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  [ 3 posts ] 

All times are UTC+01:00


Who is online

Users browsing this forum: No registered users and 1 guest


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