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 Sun May 19, 2019 10:28 pm

All times are UTC+01:00




Post new topic  Reply to topic  [ 19 posts ]  Go to page 1 2 Next
Author Message
PostPosted: Wed Jun 29, 2016 12:46 am 
Offline

Joined: Wed Jun 08, 2016 12:03 pm
Posts: 52
Hello.

I want to use all my GPIO pinns. Is there a way to fix that? Is it easy? Why do i not have free access to all pinns? I hopp that net version of PI for Codesys will open all pinns.

Else i Will use the 74HC595 shift register. I only need outputs.


Top
   
PostPosted: Thu Jun 30, 2016 4:19 am 
Offline

Joined: Fri Feb 07, 2014 7:21 am
Posts: 86
hello,

viewtopic.php?f=21&t=5832&hilit=gpio02
Best Regards
plcmax


Top
   
PostPosted: Sun Jul 31, 2016 3:24 pm 
Offline

Joined: Wed Jun 08, 2016 12:03 pm
Posts: 52
plcmax wrote:


Sorry. It was no clear answers in that topic.


Top
   
PostPosted: Mon Aug 01, 2016 7:19 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3284
Hi,
hm for us it is clear:
1. you could select which GPIO configuration you have PI A/B or PI B+PI2/PI3
if you need more GPIO's:
2. the Devicedescription for the GPIOs is here:
"c:\Users\<YourWindowsUserName>\CODESYS Control for Raspberry PI\3.5.9.10\Devices\GPIOs.devdesc.xml"
the library is here:
"c:\Users\<YourWindowsUserName>\CODESYS Control for Raspberry PI\3.5.9.10\Libraries\IoDrvGPIO.library"
feel free to customuze the GPIO's to your 3th version and to your demands.

BR
Edwin


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Fri Aug 19, 2016 6:51 pm 
Offline

Joined: Wed Jun 08, 2016 12:03 pm
Posts: 52
But we don't know what we need to edit in GPIOs.devdesc.xml and oDrvGPIO.library?

Why can't they allready been free at the first time?
I hopp next update of Raspberry PI for Codesys will have all GPIO's free to use.


Top
   
PostPosted: Wed Sep 21, 2016 4:43 pm 
Offline

Joined: Thu Aug 18, 2016 4:32 pm
Posts: 29
Edwin Schwellinger wrote:
Hi,
hm for us it is clear:
1. you could select which GPIO configuration you have PI A/B or PI B+PI2/PI3
if you need more GPIO's:
2. the Devicedescription for the GPIOs is here:
"c:\Users\<YourWindowsUserName>\CODESYS Control for Raspberry PI\3.5.9.10\Devices\GPIOs.devdesc.xml"
the library is here:
"c:\Users\<YourWindowsUserName>\CODESYS Control for Raspberry PI\3.5.9.10\Libraries\IoDrvGPIO.library"
feel free to customuze the GPIO's to your 3th version and to your demands.

BR
Edwin


Edwin,
I am trying to add a new device description for the Pi3. I just copied the one for the Pi2 and changed the name/description/id and put it in the same directory. However when I go to install the device into the device repository, my newly created devdesc.xml doesn't show up. Any idea what I am doing wrong?

Thanks in Advance.


Top
   
PostPosted: Wed Sep 21, 2016 5:07 pm 
Offline

Joined: Thu Aug 18, 2016 4:32 pm
Posts: 29
Actually, now I got the new devdesc.xml to show up, and I have added it to the device repository.

Image


Now my problem is that when I right click on the GPIO device in my project and choose "Update Device" I do not see my newly added Pi3 as an option



Image


Top
   
PostPosted: Wed Sep 21, 2016 7:41 pm 
Offline

Joined: Thu Aug 18, 2016 4:32 pm
Posts: 29
So I got tired of waiting and just decided to edit the devdes.xml for the B+. I have now managed to get all of the GPIO pins to show up in the GPIO Parameters Screen which is driven by the devdesc.xml file.

Image

However I cannot figure out how to get the extra pins to show up in the GPIO I/O Mapping screen. I assume this screen is driven by the IoDrvGPIO Library and I have tried to make the necessary changes to that library, but still cannot get the pins to show. (Basically I did a find/replace on 31 and changed to 39)

Image

It seems a bit strange that you guys haven't included this functionality by default, is there any updates coming that will add the extra Pins? I really need to know this functionality is available before I spend the money on the license.


Top
   
PostPosted: Thu Sep 22, 2016 5:17 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3284
Hi,
maybe you explain me what you think the difference is between PI2 and PI3 GPIO's.
How do you want to solve the Problem that -> SPI and I2C GPIO Pins are already busy for this functionality.
This is the reason why we do it that way (we decided this at the beginning on PI A/B release, we thought SPI and I2C are used allways), guess we will not change it due compatibility issues.
Users who need all GPIO's need to customize them by their own at the moment.
If anyone is out there who could provide us with an extended GPIO devdesc and changed library - feel free to publish either in the forum or
we could maybe add it to the delivery(this need to be clarified if possible and when this will be happen)
A question do you not/never use SPI and I2C in your application?

BR
Edwin


Top
   
PostPosted: Thu Sep 22, 2016 3:59 pm 
Offline

Joined: Thu Aug 18, 2016 4:32 pm
Posts: 29
Edwin Schwellinger wrote:
Hi,
maybe you explain me what you think the difference is between PI2 and PI3 GPIO's.
How do you want to solve the Problem that -> SPI and I2C GPIO Pins are already busy for this functionality.
This is the reason why we do it that way (we decided this at the beginning on PI A/B release, we thought SPI and I2C are used allways), guess we will not change it due compatibility issues.
Users who need all GPIO's need to customize them by their own at the moment.
If anyone is out there who could provide us with an extended GPIO devdesc and changed library - feel free to publish either in the forum or
we could maybe add it to the delivery(this need to be clarified if possible and when this will be happen)
A question do you not/never use SPI and I2C in your application?

BR
Edwin


Maybe there has been some confusion. Let me clarify what I think we are all asking for.

Image

On the Pi2 and Pi3 there are 40 pins on the header. On the Pin Mapping page in CodeSys there are only options to map Pins 0-31. I would like to map some pins in the 32-39 range.


Also, yes there are some projects where I would like to use the SPI and I2C pins as GPIO, so it would be nice if that was an option as well.


Top
   
PostPosted: Wed Sep 28, 2016 3:08 pm 
Offline

Joined: Thu Aug 18, 2016 4:32 pm
Posts: 29
Edwin Schwellinger wrote:
Hi
Edwin


Any update, does my previous post explain the issue well?


Top
   
PostPosted: Wed Sep 28, 2016 5:46 pm 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3284
hi,
If anyone is out there who could provide us with an extended GPIO devdesc and changed library - feel free to publish either in the forum...
BR
Edwin


Top
   
PostPosted: Thu Sep 29, 2016 2:27 pm 
Offline

Joined: Thu Aug 18, 2016 4:32 pm
Posts: 29
Edwin Schwellinger wrote:
hi,
If anyone is out there who could provide us with an extended GPIO devdesc and changed library - feel free to publish either in the forum...
BR
Edwin


Is this something we can get help with from one of the codesys devs? I am trying to modify this library and it is complicated, probably out of reach for most of the people on this forum. My progress so far consists of changing all the loops from 0-31, to 0-39, but I still only get 0-31 on the gpio mapping screen. Best I can tell is that the library is filtering out some of the pins based on what type they are, but there are close to 30 files in this library and its just tough to tell where the problem is.

I have attached my modified devdesc.xml if anyone wants it, but its really no good without the corresponding library.


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Wed Oct 05, 2016 5:34 am 
Offline
Site Admin

Joined: Mon Sep 05, 2005 9:42 am
Posts: 3284
Hi,

next step is to add these changes to
"c:\Users\<YourWindowsUserName>llinger\CODESYS Control for Raspberry PI\3.5.9.x\Libraries\IoDrvGPIO.library"
for working with libraries and Testproject read this here:
viewtopic.php?f=22&t=5641&p=10677#p10677
Work with two instances of CODESYS - one opens the library the other one your testproject to check the GPIOS.

You could debug it by Setting brakepoint into the library and step in (sure in the testproject instance)
As a first try just search for the for loops and increase them to your io size --
Hope this helps.

BR
Edwin


You do not have the required permissions to view the files attached to this post.


Top
   
PostPosted: Fri Oct 07, 2016 2:23 pm 
Offline

Joined: Thu Aug 18, 2016 4:32 pm
Posts: 29
Edwin Schwellinger wrote:
Hi,

next step is to add these changes to
"c:\Users\<YourWindowsUserName>llinger\CODESYS Control for Raspberry PI\3.5.9.x\Libraries\IoDrvGPIO.library"
for working with libraries and Testproject read this here:
viewtopic.php?f=22&t=5641&p=10677#p10677
Work with two instances of CODESYS - one opens the library the other one your testproject to check the GPIOS.

You could debug it by Setting brakepoint into the library and step in (sure in the testproject instance)
As a first try just search for the for loops and increase them to your io size --
Hope this helps.

BR
Edwin



Yes I did that already and never could get it to work. I changed every for loop from 31 to 39 in the whole library and never saw any additional pins show up in the GPIO mapping screen. There must be some other part that is I am missing.


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

All times are UTC+01:00


Who is online

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