Cannot change timer preset from webpage

SCADAdoc
2011-09-13
2011-09-14
  • SCADAdoc - 2011-09-13

    I have not been able to change a timer preset from a web visualization. I am using CoDeSys ver. 2.3.9.13 and a Wago 750-841.
    I can change the value of a type word, but not a type time. Also, it works fine in the CoDeSys IDE - can this be done?

    Thanks,
    Steve

     
  • shooter - 2011-09-13

    yes it can be done but as you say it is a type word you can change so just give it in type word and convert it with WORD_TO_TIME in the program, done it before with some timers.
    just give the numbers of msec or sec to the program.
    if needed you can also make it more work by giving minutes and seconds apart and calculate it in your program.
    you can also use the any text input to variable text input and convert the number.
    to change the system time you will need a little more
    look at w www.oscat.de w

     
  • SCADAdoc - 2011-09-13

    Thanks Shooter - I suspected I might have to add some program code, but was hoping there was a way to avoid it. Another group is making some ongoing changes to the program while I am doing the Visu. I plan on importing the Visu at some point and this will require just a bit more careful coordination.

    These little mid-stream corrections are what make integration work so interesting right?

     
  • SCADAdoc - 2011-09-14

    As often happens - one thing has led to another. My test for the original question consisted of entering minutes, seconds, and milliseconds into global Word variables in the Visu, then pushing a button and all is converted to milliseconds and fed into the Word_To_Time and out to a Time variable for use as the timer preset in PLC_PRG. That worked great. What I need to do is keep the code for this in a separate POU so it and the Visus I am working on can be easily merged with the programming going on in another group.

    What I am trying (and failing) to do now is call a ST program from a button on the Visu page. I want to execute the ST (Prg) POU from the Input | Execute Program command on a button element, but nothing happens, either from the CoDeSys IDE or the web page. I've read this section of the manual and read other posts on this forum concerning the 'Execute Program' command, but no luck so far. Could someone help please.

    Thanks,
    Steve

     
  • SCADAdoc - 2011-09-14

    I was able to call the ST POU by configuring an Event Task which is triggered by the Tap property on a button element. That accomplishes my goal, but I am still very much interested in finding out if/how the ST POU can be called directly with 'Execute Program' as I feel that would be less intrusive.

    Am I completely off track in trying to do this with Execute Program? Is that just for running external programs such as Excel or Notepad as some of the post mention elsewhere on this forum?

    Thanks Again,
    Steve

     

Log in to post a comment.