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

modbus import mapping through *.csv file

ericci
2018-05-29
2018-06-06
  • ericci - 2018-05-29

    Hi all!

    Here to find out how to import csv modbus mapping into the environment correctly.
    Can anyone post an example, tutorials and documentation about the right procedure?

    1. My project with modbus tcp master configured is working fine. 16 coils read.

    2. I tried to export these coils into a csv file, after having deleted the mapping.

    3. I tried to import the same file and i have error like '
      is not found!' . It's impossible because i've created one with the same name!!

     
  • ericci - 2018-05-31

    What good is this forum if anybody answers to questions and any satisfying documentation are present in website and internet?
    Where are 3s technicians?

     
  • eschwellinger

    eschwellinger - 2018-06-01

    Hi,
    Which plc are you using and which CODESYS version.
    Modbus is never the best choice this is for sure!
    Think on how easy this is with Ethercat or Profinet... you could scan the slaves and add them via scan including the configuration)
    With Modbus this is always a pain.

    You need to customize you modbus settings in the device description after doing this even import csv would probably work( not sure never used it)
    Means this default Modbus slave is a generic empty device without channels ... so how should this work.

    BR
    Edwin

     
  • ericci - 2018-06-04

    My questions aren't related to what the best choice is, but how to get your software features working.
    If you don't support customers correctly what is the reason to keep them alive?
    I suggest to all 3s company to improve documentation and examples to be tested because it's very tedious to find out myself without any comprehensive document.

    Regards

     
  • eschwellinger

    eschwellinger - 2018-06-04

    Hi,
    If have tested this now it works for my modbus application.(using current Version)
    1. rightclick on the slave export the mappings to csv
    2. delete the mappings
    3. Import the csv file -> all mappings are restored

    So if you think this is a bug why not simple reporting it to the CODESYS store -> my question, bug Report with version info projectarchive / steps to repeat, whatever is needed?
    (You describe in your post you add mapping - export it - import it but does not work)
    So how could we solve this by documentation if it is a bug?

    BR
    Edwin

    IMG: after_csv_import.jpg

     
  • ericci - 2018-06-05

    Zitat:
    You need to customize you modbus settings in the device description after doing this even import csv would probably work( not sure never used it)
    Means this default Modbus slave is a generic empty device without channels ... so how should this work.

    As you said The modbus device without channels is an empty and useless device even having imported the correct map.
    For getting your map working fine through *.csv file you have to write the requests one by one and then import the map.
    The best thing is to import only one file with all needed information to create channels as well and for sure describe how the has to be edited.

    Regards.

     
  • eschwellinger

    eschwellinger - 2018-06-05

    customizing the modbus slave would be an option, this is what I have said.
    But even without on my slave it works.
    So please give your steps to repeat and description in which case it does not work.

    BR
    Edwin

     
  • ericci - 2018-06-06
     
  • eschwellinger

    eschwellinger - 2018-06-06

    more detailed description how I do it:

    Open Codesys 3.5.12.x and start new project.
    Create a modbus master device and configure correctly a modbus slave device. In my case codesys application is Master.
    Add Channels and add mapping on the IO's to variables
    Export CSV file by rightlick on the slave an -> Export csv
    delete the mappings in the ModbusTCP_Slave Tap
    Import a map through csv file. - > rightclick on the Modbus TCP slave -> Import mappings from CSV

    *The system imports the mappings from the csv and the variables in ModbusTCP_Slave Tap are back

     

Log in to post a comment.