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.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old June 24th, 2006, 12:18 AM   #1
al_d
Member
Australia

al_d is offline
 
Join Date: Nov 2004
Posts: 36
Unhappy Wincc Problem

Hi,

I am new to wincc and was wondering how to force on PLC contacts. At the moment I have set up and assigned a external tag with contact I124.0 (as an input). I can get the light on the button to turn on when the contact on the PLC closes, but when I made a new tag and assigned it as an output with the same contact I124.0 I cannot switch the contact on in wincc. I have not found any useful documentation on this topic, does anyone have such documentation?

Thanks.
  Reply With Quote
Old June 24th, 2006, 12:46 AM   #2
girevik
Member
Russian Federation

girevik is offline
 
girevik's Avatar
 
Join Date: Nov 2005
Location: rus
Posts: 179
In fact you are changing the I124.0 in the PLC, but at the start of the new cycle of the PLC this contact updated according to the PLC input status...

so it might be a good idea to use in your program merker area contact like m124.0.

but it's not totally clear what do you want to achieve, do you want to always overwrite the I124.0 bit from the WinCC or just sometimes?

In the first way, you just use m124.0 instead of i124.0 and write there from wincc, since you will not need any information from real input.
In the second way, you will need additional bit which will state if the bit should be taken from wincc or from real input, let's say m124.1=0 when you need to get info from winccc and m124.1=1 when you want to get info from plc input... then you will have to use easy logic, like if m124.1=1 then m124.0=i124.0...


just my opinion...
  Reply With Quote
Old June 24th, 2006, 02:01 AM   #3
al_d
Member
Australia

al_d is offline
 
Join Date: Nov 2004
Posts: 36
I am trying to set up a tag and assign it to a button and use this button to turn on I124.0. I am very new to wincc and dont no much.


Thanks.
  Reply With Quote
Old June 24th, 2006, 02:29 AM   #4
girevik
Member
Russian Federation

girevik is offline
 
girevik's Avatar
 
Join Date: Nov 2005
Location: rus
Posts: 179
I124.0 is an PLC input, so you cant turn it directly (and i'm not sure why you really need to turn the PLC input, in case of such deal, you would not need PLC input at all, so could you explain some more details what and why do you need, that way we couyld help more), you can use above mentioned way with M bits...
  Reply With Quote
Old June 24th, 2006, 02:49 AM   #5
al_d
Member
Australia

al_d is offline
 
Join Date: Nov 2004
Posts: 36
I have currently set up wincc to communicate with 2 s7-300.The outputs of the PLCs are not connected to anything at this stage and at the moment I would like perform a basic task in being able to switch on I124.0 in wincc using a button and see this contact close in step-7. I am not sure how to set up the tags or properties of the button to be able to do this.

Thanks.
  Reply With Quote
Old June 24th, 2006, 02:58 AM   #6
CroCop
Member
United States

CroCop is offline
 
Join Date: Aug 2005
Location: Utah
Posts: 1,050
Quote:
Originally Posted by al_d
I have currently set up wincc to communicate with 2 s7-300.The outputs of the PLCs are not connected to anything at this stage and at the moment I would like perform a basic task in being able to switch on I124.0 in wincc using a button and see this contact close in step-7. I am not sure how to set up the tags or properties of the button to be able to do this.

Thanks.
As Grivek said, you won't be able to alter an input directly. You'll need to alter a variable that isn't written over on every scan....
  Reply With Quote
Old June 24th, 2006, 03:07 AM   #7
al_d
Member
Australia

al_d is offline
 
Join Date: Nov 2004
Posts: 36
If i have a network with I124.0 in series with Q124.0 in step 7 and i want to use a button in wincc to turn the output Q124.0 what would i have to do?

Thanks.
  Reply With Quote
Old June 24th, 2006, 03:10 AM   #8
CroCop
Member
United States

CroCop is offline
 
Join Date: Aug 2005
Location: Utah
Posts: 1,050
Quote:
Originally Posted by al_d
If i have a network with I124.0 in series with Q124.0 in step 7 and i want to use a button in wincc to turn the output Q124.0 what would i have to do?

Thanks.
Do like Grivek said.
Put the m124.0 in parallel with the I124.0, and reference m124.0 in your wincc.
  Reply With Quote
Old June 24th, 2006, 03:16 AM   #9
PeterW
Member
Canada

PeterW is offline
 
Join Date: Jun 2006
Location: Edmonton
Posts: 2,418
Not sure why you want to turn on an Input, it is possible though.

As someone mentioned, the Inputs are updated at the start of every scan so if you do it as a once switch, it will turn off again on the next scan. If you set a tag to continuously set the input, then it will still get turned off at the start of a scan, wincc will then turn it back on again, but there will be scans and part scans where it will be controlled by the real world again.

As someone mentioned it is better to turn on/off a flag and use this.

Call a function as the very first instruction in OB1, call this function Force_Input. You could then set up all the forces you require in there, either individual bits or whole bytes words.

examples.

A M 124.0
O I 124.0
= I 124.0

or

L MB124
L IB124
OW
T IB124

or

L MW124
L IW124
OW
T IW124

If I was doing this I would want some sort of warning to let me know an input was forced, to help remember to turn it off again.

If your requirement is only to turn on the output, there's no need to turn on the input at all, either select a flag and set the output via that, i.e.

A M 124.0
= Q 12.0

or ensure the output is not addressed anywhere in the PLC code and just set the output.

Forcing outputs can be dangerous though, hope you know what your doing.

Last edited by PeterW; June 24th, 2006 at 03:20 AM.
  Reply With Quote
Old June 24th, 2006, 03:19 AM   #10
al_d
Member
Australia

al_d is offline
 
Join Date: Nov 2004
Posts: 36
Ok thanks girevik and CroCop.
  Reply With Quote
Old June 24th, 2006, 03:31 AM   #11
girevik
Member
Russian Federation

girevik is offline
 
girevik's Avatar
 
Join Date: Nov 2005
Location: rus
Posts: 179
I'm not sure if you should Put the m124.0 in parallel with the I124.0.. if you do so, there are two choices:
a) if the input is not connected somewhere, it's always zero, and is updated to zero each scan, so at the start of the scan it does not change anything in parallel connection since it's always zero.
b) if the input is connected somewhere and sometimes may go to 1, then you will not have the real control over the input from WinCC, i mean if real input goes to 1, then it will stay 1 and will not depend on value from WinCC, so you can't controll it totally, you just will be able to force it to 1 but will not able to always force it to zero...

so if you need to ignore real input and use WinCC value, you just should use something like

A M 124.0
= I 124.0

at the start of the program in OB1.. like PeterW has mentioned...


just my opinion...
  Reply With Quote
Old June 24th, 2006, 03:44 AM   #12
PeterW
Member
Canada

PeterW is offline
 
Join Date: Jun 2006
Location: Edmonton
Posts: 2,418
I've seen this before to enable forcing temporarily failed inputs (in word format though).

A M 124.0
O I 124.0
= I 124.0

enables the actual real input to control its own state when the flag is off.

A M 124.0
= I 124.0

is not good, as the input can never control itself.

The first option works whether the input is physically connected or not.

The code I came across was some time ago in an S5.

L DL4
L IB4
OW
L DR4
AW
T IB4

The DL's were all off normally and the DR's were normally on, therefore turning on a L bit forced the input ON, turning off a R bit forced it OFF. OFF had priority.
  Reply With Quote
Old June 24th, 2006, 04:03 AM   #13
al_d
Member
Australia

al_d is offline
 
Join Date: Nov 2004
Posts: 36
Thanks for help.
  Reply With Quote
Old June 24th, 2006, 04:04 AM   #14
al_d
Member
Australia

al_d is offline
 
Join Date: Nov 2004
Posts: 36
Thanks for the help.
  Reply With Quote
Old June 24th, 2006, 04:08 AM   #15
girevik
Member
Russian Federation

girevik is offline
 
girevik's Avatar
 
Join Date: Nov 2005
Location: rus
Posts: 179
in case of haveing the choice: to force or to use real input i would go with such logic:


that way I can either use real input (when m124.1=0) or control the input from WinCC when the m124.1=1, now i can either make input 0 or 1...



in my opinion
A M 124.0
O I 124.0
= I 124.0

will work correctly only without connected devices to the real input, as i have mentioned if the device turn on the input, you will not be able to control it through WinCC, it will be ON always untill the device turn it off..

but everything depend on the task, and it may be ok for some tasks... i'm just not sure if the author of the topic should have the whole control or just to turn it on... and if he should still have the control on the real input or not...

now he has many choices


just my opinion...
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


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 <=> Texas communication problem sdw4 LIVE PLC Questions And Answers 4 October 31st, 2006 01:44 AM
WinCC - Problem with Trends Franz LIVE PLC Questions And Answers 1 November 17th, 2005 12:17 AM
Alarm acknowledging in WinCC problem... metaller LIVE PLC Questions And Answers 1 July 27th, 2005 08:18 AM
WinCC 5.0 sp2, save tags in CSV problem johnny LIVE PLC Questions And Answers 3 May 26th, 2005 07:22 PM
VB of WinCC problem Fritz_frederix LIVE PLC Questions And Answers 4 September 15th, 2003 10:22 PM


All times are GMT -5. The time now is 07:42 AM.


.