Read from gateway into array

Topics about the Hardware of Revolution Pi
Post Reply
mirko.comparetti
Posts: 36
Joined: 04 Jun 2018, 11:01
Answers: 0
Location: Lomazzo

Read from gateway into array

Post by mirko.comparetti »

Hello,
Suppose I have an I/O device (like AIO or DI/DO/DIO) and I want to configure the variable associated with the physical I/O pins to the field of an array. Would that be possible from pictory, assuming I'll use the proper array data type?

Thanks,
Mirko
User avatar
dirk
KUNBUS
Posts: 1924
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Read from gateway into array

Post by dirk »

Dear Mirko, unfortunately there is no array access possible. But in PiCtory there exist "variants" for the DI/DO/DIO modules. Here you may switch the IO variables to 2 bytes.
So you could set all the inputs or outputs of one module via one variable.
Attachments
PiCtory Variants
PiCtory Variants
2019-05-21 10_43_46-How to Configure RevPi DIO by Using PiCtory - Industrial Raspberry Pi.png (52.56 KiB) Viewed 3908 times
mirko.comparetti
Posts: 36
Joined: 04 Jun 2018, 11:01
Answers: 0
Location: Lomazzo

Re: Read from gateway into array

Post by mirko.comparetti »

dirk wrote: 21 May 2019, 10:45 But in PiCtory there exist "variants" for the DI/DO/DIO modules.
Hello Dirk,
Thanks for your reply. And what about the AIO? Is there something similar for that?
We are thinking of an application where we will have multiple RevPi with different AI and we are writing a code that is "general purpose" and it reads a configuration file that we will write in every device. The possibility of using a "generic" access to the IO variables will help a lot and ease the deployment of multiple devices.

Thanks
User avatar
dirk
KUNBUS
Posts: 1924
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Read from gateway into array

Post by dirk »

Dear mirko.comparetti, no the AIO is not designed to support this byte access as this are analog values. But in this case you can create your own RAP file for your own device in PiCtory - Tutorial 25 – Create your own RAP file
mirko.comparetti
Posts: 36
Joined: 04 Jun 2018, 11:01
Answers: 0
Location: Lomazzo

Re: Read from gateway into array

Post by mirko.comparetti »

dirk wrote: 21 May 2019, 12:53you can create your own RAP file for your own device in PiCtory - Tutorial 25 – Create your own RAP file
Hello Dirk,
Thanks, so basically I can create a new version of the AIO rap file to work with arrays? Did I undestood this correctly?

Thanks,
Mirko
User avatar
dirk
KUNBUS
Posts: 1924
Joined: 15 Dec 2016, 13:19
Answers: 4

Re: Read from gateway into array

Post by dirk »

Dear Mirko, I am not sure if I understood your requirement and also if a customized RAP file may help you. But this could be a point in your research that you can put into discussion for your project stakeholders. So just have a look at the documentation and there is always more than one way to solve a problem. So for example there are also Virtual Modules that just lets you reserve free space on the process image. You could also customize this module so that you can access the data according to your needs and write a small program that fills it with the data of the AIO module.
Post Reply