Norbert
Hello, i am currently using raspberry pi 3 b+ with high precision ad/da extension board and i would like to know how to assaign an address like %AI0 to analog in/outs from extension board? Is it even possible to program extension boards using openplc software?



Sincerely
Norbert
Quote 0 0
thiagoralves
OpenPLC cannot use extension boards on the Pi. To use them, a driver needs to be written for the OpenPLC telling the runtime how to handle the extra IO points. 
Quote 0 0
Norbert
could you show me an example of  such driver?
Quote 0 0
thiagoralves
There are drivers for a bunch of platforms on /webserver/core/hardware_layers/. You can follow the examples to create one for your board. 
Quote 0 0
Norbert
My extension board have 4 analog inputs and i tried to change source code in raspberrypi.cpp to use these pins , but how can i set these pins as analog inputs when function pinmode in wiringpi library has only for modes: Input , output, pwm_output, gpio_clock??
Quote 0 0
thiagoralves
Google is your friend. You can’t set any pin on the Pi to be analog. All Pi pins are digital only. Your board certainly uses a chip to make analog readings and convert them to digital so that the Pi can read. You will have to identify which chip your board uses and write a little code to read the values from the chip. As I said, Google is your friend.
Quote 0 0