Moderator: RevPiModIO

 
LEOMENA
Topic Author
Posts: 44
Joined: 02 Aug 2021, 21:57

HOW TO WRITE TO VALUES USING REVPIMODIO2

06 Aug 2021, 20:50

Hi, I am trying to locate an example of use of revpimodio2 to write values to an AIO Modules and a MODBUS RTU device, What I mean by this is:
I am able to write values in my process image like:
rpi.io.OutputValue_1 = My_Value
And my Process Image takes such values. But when I want to verify they took effect by using Pictory command: "Load Start Config", I notice the changes did not take effect.
Why is that? Is it possible to use Pictory to verify that next time the config file is loaded, those changes are there?


Same thing happens with my Modbus RTU Master Virtual Device:

rpi.io.Output_Word_1 = My_Value
It does not show in Pictory when I reload the config file.

Thanks in advance...

PS. I want to clarify that at the current stage I am in, I am only configuring the modules and the physical units are not present. However, I assumed that for the sake of testing and simulations, this is possible to be done with Pictory.
Here's my piTest -d:

pi@RevPiLeo:~/Documents/PROGRAMS/ModRevPIO2 $ piTest -d
Found 3 devices:

Address: 0 module type: 105 (0x69) RevPi Connect V1.0
Module is present
input offset: 89 length: 6
output offset: 95 length: 5

Address: 31 module type: 32871 (0x8067) RevPi AIO V0.0
Module is NOT present, data is NOT available!!!
input offset: 0 length: 20
output offset: 20 length: 4

Address: 64 module type: 24580 (0x6004) ModbusRTU Master Adapter V0.0
Module is present
input offset: 100 length: 101
output offset: 201 length: 73
 
User avatar
Boris Crismancich
KUNBUS
Posts: 23
Joined: 21 Apr 2017, 12:04

Re: HOW TO WRITE TO VALUES USING REVPIMODIO2

11 Aug 2021, 07:49

Hi Leo,

you can do this either cyclic or event-based.

Cyclic
https://revpimodio.org/en/cyclic-with-python/#more-2347

Event-based
https://revpimodio.org/en/events-in-the ... /#more-706
Kind regards / Herzliche Grüße / Cordiali saluti
Boris Crismancich

Who is online

Users browsing this forum: No registered users and 0 guests