Welcome to our new forum
All users of the legacy CODESYS Forums, please create a new account at account.codesys.com. But make sure to use the same E-Mail address as in the old Forum. Then your posts will be matched. Close

How to create I/O mapping for new devices

  • dhoehl

    dhoehl - 2015-11-25

    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

  • eschwellinger

    eschwellinger - 2015-11-30

    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\\Devices\PiFaceIOdrv.devdesc.xml"
    the library here:
    "c:\Users\<yourwindowsusername>\CODESYS Control for Raspberry PI\\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>



Log in to post a comment.