Activity for Scripting

  • bnewman bnewman posted a comment on ticket #23

    this is an improved version that doesn't throw an exception if the property already exists def CreateAllProperties(fbname, shouldAddMonitor = False): # get current project project = projects.primary # find the function block fb = project.find(fbname, True)[0] # get the declaration text declaration = fb.textual_declaration # iterate all lines in the declaration for i in range(declaration.linecount): line = declaration.get_line(i) # get this declaration line stripped = line.strip() # strip out white...

  • hermsen hermsen posted a comment on ticket #23

    def CreateAllProperties(fbname): # get current project project = projects.primary # find the function block fb = project.find(fbname, True)[0] # get the declaration text declaration = fb.textual_declaration # iterate all lines in the declaration for i in range(declaration.linecount): line = declaration.get_line(i) # get this declaration line stripped = line.strip() # strip out white space in this line endofline = stripped.find(";") stripped = stripped[0:endofline] # discards anything past the ";"...

  • hermsen hermsen created ticket #23

    CreateProperties from variable declaration in FB

  • Ingo Ingo modified ticket #21

    update project information

  • i-campbell i-campbell created ticket #22

    Print all libraries and their dependencies

  • hermsen hermsen posted a comment on ticket #12

    alternatively check the sim is enabled beforehand and turn it on if not yet enabled devs = proj.find('testdev') if len(devs) > 0: # check if sim is enabled cur_sim_mode = devs[0].get_simulation_mode() print(cur_sim_mode) # enable sim conditionally if not cur_sim_mode: devs[0].set_simulation_mode(True)

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a comment on ticket #21

    See attached file for result

  • Ingo Ingo modified ticket #21

    update project information

  • aliazzz aliazzz posted a comment on ticket #21

  • aliazzz aliazzz posted a comment on ticket #21

    Just remove the line.

  • hermsen hermsen modified a comment on ticket #21

    Nice

  • hermsen hermsen posted a comment on ticket #21

    just an old habit to add such future imports, just remove the line

  • Ingo Ingo posted a comment on ticket #21

    Hi Aliazzz, thanks a lot! I did myself not know how to customize the project information. But what was the future import good for? it doesn't seem to be used anywhere.

  • aliazzz aliazzz created ticket #21

    update project information

  • Ingo Ingo created ticket #20

    Update Device

  • codesys.com codesys.com modified a wiki page

    Home

  • Ingo Ingo modified ticket #19

    Install missing libraries

  • Ingo Ingo created ticket #19

    Install missing libraries

  • Ingo Ingo modified a wiki page

    Home

  • Ingo Ingo modified ticket #18

    Installation of missing libraries

  • jelle jelle created ticket #18

    Installation of missing libraries

  • Ingo Ingo modified ticket #17

    Handle Answers of Dialogs

  • Ingo Ingo created ticket #17

    Handle Answers of Dialogs

  • Ingo Ingo modified ticket #16

    Disable System Prompts and Dialogs

  • Ingo Ingo created ticket #16

    Disable System Prompts and Dialogs

  • Ingo Ingo modified ticket #15

    Searching for an object example

  • i-campbell i-campbell modified a comment on a wiki page

    This wiki page has a section on help.codesys.com currently it links only to the section that details the available classes and functions. Scripting Engine There is another section not yet mentioned in the wiki article. It is in another area of help.codesys.com that scripters might find useful, and that is: CODESYS Development System > Using Scripts edit: clarified content. I guess it is a pull request to add the 'other' section of help.codesys.com

  • i-campbell i-campbell posted a comment on a wiki page

    as well the api list already mentioned, help.codesys.com also has details on how to script. CODESYS Development System > Using Scripts

  • aliazzz aliazzz created ticket #15

    Searching for an object example

  • Ingo Ingo created ticket #14

    Login and monitor variable

  • Ingo Ingo created ticket #13

    Add device to project

  • Ingo Ingo created ticket #12

    Switch device to simulation mode

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

  • i-campbell i-campbell posted a comment on a wiki page

    I think it is important to note that Visual Studio Community is not able to be used legally in all scenarios. If you use it only for creating open source content you are fine (right now), but in all other cases I would check the "Usage" section of this link https://visualstudio.microsoft.com/vs/community/ [History, maybe not relevant] At one point Visual Studio Express was available and free in all use cases. Now your free options are Visual Studio Community (for some use cases) and Visual Studio...

  • Ingo Ingo modified a wiki page

    Home

  • Ingo Ingo modified ticket #3

    Create an FB

  • Ingo Ingo modified ticket #5

    Export as PLCOpen XML

  • Ingo Ingo modified ticket #6

    Modify Properties / Compiler defines

  • Ingo Ingo modified ticket #7

    SVN checkout

  • Ingo Ingo modified ticket #8

    SVN commit

  • Ingo Ingo modified ticket #9

    SVN update

  • Ingo Ingo modified ticket #11

    Check compile errors of libraries

  • Ingo Ingo modified ticket #2

    Iterate over the device tree

  • Ingo Ingo modified ticket #2

    Iterate over the device tree

  • Ingo Ingo posted a comment on ticket #2

    Comes from a forum user, who didn't define a license: https://forum.codesys.com/viewtopic.php?t=7626

  • Ingo Ingo created ticket #11

    Check compile errors of libraries

  • Ingo Ingo created ticket #10

    Add Device with Task Configuration

  • Ingo Ingo created ticket #9

    SVN update

  • Ingo Ingo created ticket #8

    SVN commit

  • Ingo Ingo created ticket #7

    SVN checkout

  • Ingo Ingo created ticket #6

    Modify Properties / Compiler defines

  • Ingo Ingo created ticket #5

    Export as PLCOpen XML

  • Ingo Ingo modified ticket #3

    Create an FB

  • Ingo Ingo created ticket #3

    Create an FB

  • Ingo Ingo created ticket #2

    Iterate over the device tree

  • Ingo Ingo created ticket #1

    Open and close a project

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

  • aliazzz aliazzz modified a wiki page

    Home

1 >