Help with PLC configuration

panos
2005-04-06
2005-04-07
  • panos

    panos - 2005-04-06

    Hello,

    I 've been trying to follow the example you have in your documentation with the traffic lights. I believe I have managed that till the point were the colors of the 2 lights are assigned to global variables in the Resources area. I write the necessary declerations:

    VAR_GLOBAL

    IN AT %IB0.0:BOOL;
    
    L1_GREEN AT %QX0.0:BOOL;
    
    L1_YELLOW AT %QX0.1:BOOL;
    
    L1_RED AT %QX0.2:BOOL;
    
    L1_GREEN AT %QX0.3:BOOL;
    
    L1_YELLOW AT %QX0.4:BOOL;
    
    L1_RED AT %QX0.5:BOOL;
    

    END_VAR

    but when I try to build the project I get error messages specifying that the above addresses are invalid. I noticed that in the CoDeSys manual you write

    "We will not do the needed controller configuration here in this example, because it depends on which target package you have available on your computer. Please see PLC configuration for further information"

    As target I use the Windows NT Soft PLC included in your demo package. I read the instructions for PLC configuration but I don't understand what I have to do to configure these addresses. You mention "*.cfg" files but not what these files look like. Moreover when I go to the Option "PLC configuration" I only get the standard Settings and I can append a CanMaster or a CanElement but I don't think I need such things. Could you please help me with that?

    Thank you very much in advance

     
  • RolandWagner

    RolandWagner - 2005-04-07

    In the standard Setup of CoDeSys there are no configuration files included for the PLCWinNT-SoftPLC.

    In case you e.g. select the hard real time SoftPLC CoDeSys SP RTE as the target you could select several fieldcard modules such as the CP5613. For this Profibus fieldbus card you can append a sub element and configure its Inputs and Outputs. Thus you will have the physical I/O addresses available listed in the declaration of the global variables.

    You can extend the available fieldbus cards and subelements (input and output nodes) by copying the Profibus GSD files in one of the configuration directories (specified in the menu Project / Options / Directories).

    In case you just want to test the example without physical addresses but with the SoftPLC you can as well switch of the address check: Open the Target Settings dialogue (in the register card Resources) and highlight the register card "General" there. You will find the option "no address check" that can be activated.

    By the way: In your example of the declaration you have to use unique variable names . You forgot to rename the LEDs after copying them.

     

Log in to post a comment.