I would like to create my own I2C libraries with help of https://forge.codesys.com/drv/io-drivers/doc/I2C/?version=1
However, I need to use it in Runtime without adding devices into a device tree in Codesys Development System which means i need to dynamically add I2C devices with IEC code.
Is it possible to just instantiate the library FBs and use it in Runtime?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello.
I would like to create my own I2C libraries with help of https://forge.codesys.com/drv/io-drivers/doc/I2C/?version=1
However, I need to use it in Runtime without adding devices into a device tree in Codesys Development System which means i need to dynamically add I2C devices with IEC code.
Is it possible to just instantiate the library FBs and use it in Runtime?
Hi,
in the forum examples,
https://forge.codesys.com/forge/talk/Runtime/thread/04361f89ec/?limit=25#333d
there is an example you just add I2C master and
use the fb's to access the I2C device in your code.
https://forge.codesys.com/forge/talk/Runtime/thread/04361f89ec/?limit=25&page=1#5a8f
I think this is what you need to archive this.
Do you think there'd be a way to turn this into a library?
How would I2C_master be passed down to POU FBs?
Thanks Mr. Edwin.
It seems the example project direct access to I2C_Master address without using I2C library FB.
What if i add I2C_Master and instantiate I2C library FB and use it? (no connection between I2C_Master and I2C device library FB) Nothing happen?