i am struggeling to understand how to create an i/o mappig i can use within codesys.
I adjusted a predefined device description file and programmed the lib, my device (MCP4812 D/A converter with SPI interface) is now running.
I can access the variables using my MCP4812 instance and the corresponding variables...but i'd like to map the codesys variables via the i/o section of the spi device. How do i do that?
i looked at excisting SPI devices which support this and they all use the whole IoDrv/Base libraries...and couldn't find documentation for that and have no idea how it works ... or is there a program which does everything for me (like the device description builder i read in the xml file? what is it?)
Hope you can help as i am new to codesys
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
if you want provide an SPI Driver for your device you need to add your library and your devicedescription for your device.
Maybe PiFace_Io_driver is the startpoint you need.
The device description which you find here:
"c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\2.2.0.2\Devices\PiFaceIOdrv.devdesc.xml"
the library here:
"c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\2.2.0.2\Libraries\IoDrvPiFace.library"
check the FAQ's in the forrum for best practice on generating libraries (two instances CODESYS one with the library the other with the project... etc)</yourwindowsusername></yourwindowsusername>
BR
Edwin
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi everyone,
i am struggeling to understand how to create an i/o mappig i can use within codesys.
I adjusted a predefined device description file and programmed the lib, my device (MCP4812 D/A converter with SPI interface) is now running.
I can access the variables using my MCP4812 instance and the corresponding variables...but i'd like to map the codesys variables via the i/o section of the spi device. How do i do that?
i looked at excisting SPI devices which support this and they all use the whole IoDrv/Base libraries...and couldn't find documentation for that and have no idea how it works ... or is there a program which does everything for me (like the device description builder i read in the xml file? what is it?)
Hope you can help as i am new to codesys
Hi,
even for this a good startpoint is:
if you want provide an SPI Driver for your device you need to add your library and your devicedescription for your device.
Maybe PiFace_Io_driver is the startpoint you need.
The device description which you find here:
"c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\2.2.0.2\Devices\PiFaceIOdrv.devdesc.xml"
the library here:
"c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\2.2.0.2\Libraries\IoDrvPiFace.library"
check the FAQ's in the forrum for best practice on generating libraries (two instances CODESYS one with the library the other with the project... etc)</yourwindowsusername></yourwindowsusername>
BR
Edwin