WinCC Flexible Runtime Simulator With Scripts?

p17061

Member
Join Date
Sep 2009
Location
Aberham
Posts
23
Hello,

I am using WinCC Flexible and want to test a script with the runtime simulator. Does anyone know if the scripts will run in the simulation mode? I made a simple IF, THEN script and some internal tags but the values on the simulator screen do not change. I can enter the values into the fields and they show up but if the script tries to change the values, they do not ever work. Basically I am using the statement IF tagname = 1 Then setbit tagname.

Thanks,

Pete
 
Hi
I have scripts working in the 'simulator' that is compile -> start runtime.
I maybe being thick but your script wont change your tag value....shouldnt it be IF tagname = 0 Then setbit tagname?
 
Probably it is the way I have done the script. I am trying to enter a setpoint in time format such as hour. I want to compare the number that I enter in for the hour to the OP panels own current time and if the hours are equal, trigger a bit. Maybe it is not looking at the correct tag in the VB script. I am not sure if HOUR is representing the panels current time.

Thanks!
 
What is triggering the script ?

Also, always use the ON ERROR RESUME NEXT code generously in the script code to troubleshoot.

And use ShowSystemAlarm to further debug your script code.
You can for example output a text that says what step the script has come to. And/or you can output the values of declared VBS variables or Tags.
 
What I am trying to achieve is to trigger an action when the current time is equal to a set time that the operator enters in the panel. There will be two internal tags TriggerHour and TriggerMinute. When the TriggerHour and TriggerMinute are equal to the current HOUR and MINUTE, a bit will trigger to 1. I have not worked with Siemens scripts before so I guess I assumed this script was running all the time like in a Wonderware application script that is running all the time. Can you point me in the right direction?

Thanks
Pete
 
Hi
I usually do this in the PLC rather than the HMI (my preference, plus if the HMI is removed (say damaged by the users) the PLC will continue trigerring.

Look in the help file for scheduling and you can run a script every minute within WinCC Flex
 
You can not have cyclically running scripts in WinCC Flexible.
Dont even think about it.
If you try to make it run cyclically, you will run into other problems.

Make the comparison of the time in the PLC.
When the conditions are as you want them, you can trigger the script once by letting the PLC code increment a tag value. The trigger tag must have added the scripts as a function to execute on the event ChangeValue.
 
You can not have cyclically running scripts in WinCC Flexible.
Dont even think about it.
If you try to make it run cyclically, you will run into other problems.

Make the comparison of the time in the PLC.
When the conditions are as you want them, you can trigger the script once by letting the PLC code increment a tag value. The trigger tag must have added the scripts as a function to execute on the event ChangeValue.

I agree with Jesper on this one.

I would compare it in the plc and set a bit if equal.
Use this bit to trigger the script on change of value, you will have to ensure that the acquisition mode for this tag in wincc is set to "Cyclic continuous".

Then start your script with:

if tagName = true then
'your code
End if
 
Ok guys thanks for the help. I have this done already in the PLC but was thinking to use scripts in WinCC since I have not done so much with them yet. I will stick with the PLC comparing. Thanks!
 

Similar Topics

i cannot transfer a wincc flexible 2008 sp3 project to a pc station (which has wincc flexible runtime 2008 and cp5611 communication board). i...
Replies
8
Views
7,376
Hi! I have a pretty awkward problem on my runtime system. It's connected to a s7-1200 and this s7-1200 calculate PartsPerMinute(PPM). Every time...
Replies
0
Views
1,211
I am trying to find out if there is a way to "read" the tag comments in WinCC Flex 2008 (SP3) during runtime. I'm using WinCC Runtime on normal...
Replies
2
Views
3,864
Hi! I have a Wincc Flexible 2008 Runtime system with archives connected to a s7-1200. This system logs "on change" and this is controlled by the...
Replies
10
Views
2,863
I would like to start a intresting thread about wincc flexible. How many of you are working projects with a lot of panels? And panels are...
Replies
0
Views
2,281
Back
Top Bottom