Silecs Basics

Create a new silecs-design

  • File --> New --> Project --> Silecs --> Design
  • Enter a name and keep the proposed silecs-version
  • Add some Blocks / Registers to the file, according to your required PLC-configuration
    • For each Block you can choose to generate a property in FESA ( @generateFesaProperty )
    • For each Register a device-specific field will be generated in FESA, using the matching FESA-datatype
    • For each Register you can choose to generate a value-item in FESA ( @generateFesaValueItem )
    • Keep in mind that you can use the Block/Register model defined here per "silecs-device"
  • Press validate-document.gif "SILECS Validate" to check that the xml-document is valid
    • If it is not valid, first fix remaining problems. Go to the "source"-view and hover the mouse over the error to see details.
  • Safe the document when it is valid.

Create a new silecs-deploy

  • File --> New --> Project --> Silecs --> Deploy
  • Enter a name and keep the proposed silecs-version
  • Add a new Controller
    • The "host-name" of the controller should be the network-name of your plc
    • Select the "SilecsDesign" name / version which you want to run on the controller
    • Add a "Device" to your "SilecsDesign" for each design-instance(silecs-device) which you want to run on this controller
    • Select your PLC-model (You can replace "Siemens-PLC by" by right-click --> replace-with --> ... )
  • Press validate-document.gif "SILECS Validate" to check that the xml-document is valid.
    • If it is not valid, first fix remaining problems. Go to the "source"-view and hover the mouse over the error to see details.
  • Press generated-code.gif "SILECS generate code" to generate the according FESA-Deployment-Unit
    • The project is now both, a FESA-Project and a Silecs-project
    • in generated/controller the files which have to be loaded into the PLC(s) can be found

Test your setup

  • upload the controller-code to the PLC
  • Run all PLC's on which you want to use the new configuration
  • Connect to the PLC by using the SILECS Diagnostic Tool
    • While you are in the silecs-deploy file, press diag-tool.gif "SILECS Diagnostic Tool"
    • Pick the class you want to test
    • Pick the controller which you want to test and press ConnectPLC
    • Press sent / receive on the different Data-Fields to check if the connection is working

Make use of the FESA-Part

Generate a FESA Class

  • Open your silecs design document (.silecsdesign)
  • Press generated-code.gif "SILECS generate code" to generate the according FESA-class
  • Pick the empty-template, if you are new to FESA
  • If you plan to build a productive class, pick the GSI-Template
  • The project is now both, a FESA-Project and a Silecs-project
  • The related SILECS C++ code will be generated into the "common" folder of the FESA-class
  • Make use of it in the actions of your FESA-class, according to your needs
  • Check the Silecs Code Snippets in order to see how to access plc blocks/registers
  • Dont forget to call the method ::setup in the specificInit method of your FESA-class, like described in the Silecs Code Snippets
  • Modify the generated FESA-class, according to your needs ( Check the FESA Wiki for help on that ! )
  • Later on you add additional SILECS Blocks/Registers in the .silecsdesign and generate according FESA properties/fields
    • Please note that old silecs-properties/fields in FESA are not removed automatically (e.g. if a Property is renamed )

Modify the generated FESA Deploy-Unit

  • Check the FESA deploy-unit document which was generated by SILECS
  • Probably you need to define scheduler, so that the generated SILECS RT-Actions get Scheduled
  • Modify the generated FESA-Deployment-Unit, according to your needs ( Check the FESA Wiki for help on that ! )
  • Compile and link the deployment-unit ( Press on the target "make all" in the eclipse make-target view )

Modify the FESA instantiation-File

  • Create a instance-file fo the FEC on which the FESA-binary should run
  • Usually it makes sense to create a FESA-device for each SILECS-device you defined

Deliver & Run the FESA binary

  • Please refer to the FESA Wiki for help on that !
  • For Siemens-PLC's: The dynamic snap7 library, which is needed in order to communicate with a plc is not available per default on a FEC.
    • You will notice that when attempting to start the FESA-binary via the start-script
    • You will need to copy the .silecsparam to the FEC (either by hand or via the fesa-eclipse-plugin post-install feature)
    • When using the daemon, the .silecsparam file will not be available by default, to fix that, go to e.g. asl733:/common/export/nfsinit/myFECName
    • ln -s ../global/silecs_siemens 45_silec_siemens
      • make sure that the number is lower than the one for the fesa script, otherwise you will need to wait 5min until your binary is started by the daemon (failover)
    • reboot the FEC

On any problems, please dont hesitate to contact the silecs-support: silecs-support(AT)gsi.de
I Attachment Action Size Date Who Comment
diag-tool.gifgif diag-tool.gif manage 197 bytes 12 Jul 2016 - 15:13 AlexanderSchwinn  
generated-code.gifgif generated-code.gif manage 591 bytes 12 Jul 2016 - 15:13 AlexanderSchwinn  
silecs_siemensEXT silecs_siemens manage 1 K 23 Feb 2018 - 12:10 AlexanderSchwinn nfsinit script for SCU's
validate-document.gifgif validate-document.gif manage 76 bytes 12 Jul 2016 - 15:13 AlexanderSchwinn  
Topic revision: r6 - 07 Jul 2021, AlexanderSchwinn
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback