running a project automaticlly

malbec
2011-05-24
2011-05-26
  • malbec - 2011-05-24

    Hello
    I have created a project and I want it to run automaticlly on powerup.
    What do I need to do?

     
  • shooter - 2011-05-24

    put a coupling in the startup directory of the computer.

    something like codesys c:\prog\prog.pro

     
  • malbec - 2011-05-25

    but that will open it in edit mode, right?
    I want that the project will get to "run" mode automatically

     
  • spfeif - 2011-05-25

    Do you mean on the target PLC? It depends on the PLC and architecture. Some PLC's don't have ram space available so the program is immediately sent to non-volatile memory and automatically starts after you have started the program with CoDeSys. using Online-> Run or F5.

    Other PLC's have ram and when you download the application is only temporarily stored in Ram memory that is volatile (lost) if you power cycle the PLC. For these PLC systems you have to perform a few steps:

    1. Download application.
    2. Go to menu Online->Create Boot Project (this pushes the application into non-volatile (Saved) memory).
    3. Press F5 or Online-> Run.
     
  • Easy rider - 2011-05-26

    You mean start up Codesys visualisation from your PC?

    You can do this by making a VBscript and putting it in the "start up" folder.

    [CODE]-------------------------------

    StrText = ("Start up program. Loading Codesys version 2 point 3.")
    set objvoice = CreateObject ("SAPI.SpVoice")
    objvoice.Volume = 100
    objvoice.Rate = 1
    objvoice.speak StrText

    Wscript.Sleep 1000

    Set objShell = Wscript.CreateObject("Wscript.Shell")
    objShell.Run "path\to\file"

    Wscript.Sleep 7000
    objShell.SendKeys "%{F8}"

    Wscript.Sleep 1000
    objShell.SendKeys "{F5}"

    Wscript.Sleep 1000
    Set oAutoIt = WScript.CreateObject("AutoItX3.Control")
    oAutoIt.MouseMove 10, 10

    Wscript.Quit

    [END_CODE]------------------------------------------

    "path\to\file" could be something like C:\program_files\S3\projects\test.pro

    Now put this text in a *.vbs file and you are ready

    You need to download "AutoItX3.Control" to move the mouse to the top left corner.

    My script also talks to you .

     

Log in to post a comment.