CODESYS - the IEC 61131-3 automation software

Welcome to the official CODESYS Forum by 3S-Smart Software Solutions GmbH | A member of the CODESYS Group
Deutsche Version English version russian version 
It is currently Tue Aug 20, 2019 2:15 am

All times are UTC+01:00




Post new topic  Reply to topic  [ 18 posts ]  Go to page Previous 1 2
Author Message
PostPosted: Sun Feb 10, 2019 10:26 am 
Offline
Frequent User
Frequent User

Joined: Wed May 04, 2016 6:00 pm
Posts: 274
Hi


Another solution


Create an FB_dio.

Inside, put an (which could be static) pointer to array[0..1024] of usint (call him iomem).

Create two persistent vars:

Index:int
Bit:int

In your fb code, if is an dinput.

Iomem:= adr(ib0);

Out:= iomem^[index] and (shl(1, bit))<>0.


Changing index and bit, you can, programaticaly change your map.

Best regards

Sent from my Moto G (5S) Plus using Tapatalk


Top
   
PostPosted: Sun Feb 10, 2019 2:21 pm 
Offline
User avatar

Joined: Fri Jan 19, 2018 3:38 pm
Posts: 76
There is a free package in the Codesys store for this. That package is very very powerful. I have used this package in a project and using it was a breeze.
Apart from providing a mechanic for free arrangeable IO channels, with different datatypes (BOOL, BYTE, WORD etc etc), it can restore previous made configurations and store current configurations onto disk.

It's called IO mapping tool, check it out: https://store.codesys.com/io-mapping-tool.html
Plus, it's open source so you can take a look inside the library to learn more about it's mechanics ;-)

_________________
CfUnit is a free and opensource Unit testing framework for CODESYS
My profile on cForge


Top
   
PostPosted: Thu Feb 14, 2019 7:23 pm 
Offline

Joined: Mon Apr 28, 2014 7:05 pm
Posts: 97
Watch this:
https://www.youtube.com/watch?v=cN_Jz9ziUTM


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 18 posts ]  Go to page Previous 1 2

All times are UTC+01:00


Who is online

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