You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old October 31st, 2009, 04:41 AM   #1
wordless
Member
Iran

wordless is offline
 
wordless's Avatar
 
Join Date: May 2009
Location: Tehran
Posts: 4
Wincc Flexible Change Value Problem!

Hi everyone
I’m beginner and I have a strange problem with wincc flexible.
There is a kind of valve in the project that sends 2 bit for its status:
“open_status” and “close_status”.

So I there are 4 conditions:

- close status = 0 and open_status= 1 : valve is open
- close status = 1 and open_status= 0 : valve is closed
- close status = 0 and open_status= 0 : valve fault
- close status = 1 and open_status= 1 : valve fault

I want to show status of a valve with a graphic object in different colors.
I make an integer tag: “valve_status”.
On “Change value” of two bits (“open_status” and “close_status”), there is a script to check 2 bits and update “valve_status” with the new number:

- close status = 0 and open_status= 1 : valve_status = 1 valve is open
- close status = 1 and open_status= 0 : valve_status = 0 valve is closed
- close status = 0 and open_status= 0 : valve_status = 2 valve fault
- close status = 1 and open_status= 1 : valve_status = 2 valve fault

I assign “valve_status” to appearance of the graphic object and give it 3 different colors.
The problem is that it works in simulator without any problem, but it doesn’t work in real OP.
The script doesn’t run in real OP. In fact I place 2 graphic objects in the screen and assign two bits (open and close status) to them. It makes the problem gone! But it’s not good.

I’m sorry for explaining too much!
Any idea!?
  Reply With Quote
Old October 31st, 2009, 11:08 AM   #2
CharlesM
Member
United States

CharlesM is offline
 
Join Date: Aug 2005
Location: Arkansas
Posts: 1,129
What panel are you using? Some panels don't support scripts.
  Reply With Quote
Old October 31st, 2009, 11:18 AM   #3
Lancie1
Lifetime Supporting Member
United States

Lancie1 is offline
 
Lancie1's Avatar
 
Join Date: Jul 2003
Location: Alabama
Posts: 9,999
Quote:
I make an integer tag: “valve_status”.
Quote:
In fact I place 2 graphic objects in the screen and assign two bits (open and close status) to them.
The problem could be that you may actually be using a binary tag for your Valve_Status, which can only have 2 values (not 3 as you need).
  Reply With Quote
Old October 31st, 2009, 02:13 PM   #4
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: ᚴᚬᛒᛅᚾᚼᚬᚠᚾ
Posts: 16,014
(rant alert)

I cringe when I see people jumping to using scripts for anything.
There ought to be a big fat warning in WinCC Flexible, telling users to not use scripts unless there is no other way, and then only very sparingly.

(rant finished)

Use the PLC to pack the animation tag based on the sensors. Dont use the HMI for this.
Then use appearance animation that are linked to the animation tag to achieve what you want.
__________________
Jesper
NOTICE:
JesperMP has passive-aggressive tendencies, can be impolite and may even use sarcasm !
Also: ᛁᚠ ᚢᚬᚢ ᚴᚬᚾ ᚱᛅᚬᛏ ᚦᛁᛋ ᚦᛅᚾ ᚢᚬᚢ ᚼᚬᚠᛅ ᚴᚬᛁᚾᛅᛏ ᛘᚢ ᚱᛅᛋᛒᛅᚴᛏ
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
WinCC and WinCC Flexible comparission Gromit LIVE PLC Questions And Answers 2 September 12th, 2009 03:16 AM
citect to wincc flexible nehe bhimaji LIVE PLC Questions And Answers 0 November 6th, 2008 01:38 AM
wincc & wincc flexible differences is_razi LIVE PLC Questions And Answers 1 September 18th, 2008 11:24 PM
Why cant OPs state the "Flexible" in WinCC Flexible ? JesperMP LIVE PLC Questions And Answers 0 August 5th, 2008 02:41 AM
WinCC Flexible and Data logging Prince LIVE PLC Questions And Answers 5 January 2nd, 2007 06:18 AM


All times are GMT -4. The time now is 03:44 PM.


.