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

IO Module - CFG file

Granus
2006-07-31
2006-08-03
  • Granus - 2006-07-31

    Hello,

    we ported your RTS to another Operating system.

    My part was/is about the IO modules.

    With Profibus, everything went fine, as the GSD files were available from the manufacturers (HMS, Siemens).

    Afterwards, i wrote a module for GPIO (General Purpose IO), whose job it is to show an output-value (binary) using some LEDs.

    The module is loaded fine by the RTS and even the Start-/DoneWriteOutputs functions are called.

    However, i think i must write a cfg file, which describes the device, and load it into the configurator, to use the module in my PLC program.

    Am I right ?

    The problem is that i have no idea, how these cfg files look alike.

    The available documents do not contain this information and i am in lack of an example.

    So here comes the question :

    What does an CFG file looks like, which defines a device, which provides 1 Byte of Output Size ?

    Thanks,

    Granus

     
  • Granus - 2006-08-03

    Hi all,

    i got it know (the Trial-and-Error-way).

    Here is the CFG File i wrote :

    ; ----- Module -----

    [Module.Card]

    Id=1234

    Class=CARD

    Name=MPC5200

    AdrEditable=Yes

    SymbolicNames=unlocked

    Icon=Plcconf.ico

    DiagnosisSize=0

    Channel1=Section=BYTE_Output,Name=OutCh_0,Adr=%QB3,AdrEditable=Yes,NodeIdEditable=Yes,Comment='Output

    Channel 0'

    ; ----- Channels -----

    [Channel.BYTE_Output]

    Id=8033

    Type=BYTE

    AdrType=B

    Class=Q

    CreateBitChannels=true

    ; ----- end of file -----

    Another thing that made problems was the IO module not returning DR_CAP_FLAG_WANTS_CONFIG on IODrvFctGetDeviceFlags.

    That resulted in the fact that output-mappings werent established and the WriteOutputs function wasnt called.

    However, its working now

    Any suggestions ?

    Regards,

    Granus

     

Log in to post a comment.