S7-PLC, Set a bit and reset it some where else

R.Mati

Member
Join Date
Nov 2010
Location
Melbourne
Posts
25
Hi all,

It is a Siemens question again :)

I want to turn a bit ON in Ladder logic to be used as trigger to run a VB script.
Then VB code will turn OFF that bit.

The thing is I can not turn the bit OFF because it is ON from the ladder logic, "the ouput bit is coil".

I want to make a bit ON without using a Coil so I can turn it OFF using VB code.

Is there a way to work around this?

Thanks so much.
 
Have done this and it shouldnt be a problem..

Are you using a pulse to set the bit so the conditions to set the bit isnt true when VB tries to reset the bit?
 
my bit is just like that DB100.DBX10.0 which is not a part of a word.

It is part of the Word DB100.DBW10 (or DBW9 for that matter).

You could also move a '0' into DB100.DBB10 (Data Block Byte) which includes bits 0..7 inclusively.

Or, you could just do the previous suggestion of 'pulsing' the ON condition so that when the OFF condition comes then it can be turned off again.

;-)

(Or have 2 mutually exclusive bits which reset / set each other for the ON and OFF conditions....)
 
You could also move a '0' into DB100.DBB10 (Data Block Byte) which includes bits 0..7 inclusively.
that is not helping. you still need to "pulse" the bit like bara_hence said. else the ladder will still make it "on". quick example -
bad:
Code:
|  M0.1                 M0.2
|---][-------------------( )---
|
as long as M0.1 stays high, M0.2 is also high.
you can not assume the VB program will keep/set the M0.2 bit low because for example updates from "outside" like HMI's happen asynchronously with the PLC cycle scan.

"good":
Code:
|  M0.1    M0.3          M0.2
|---][------(P)-----------(S)---
|
first we need a pulse (positive flank detection), then we set/latch M0.2 so it can be reset/unlatched from outside
M0.1 = PLC wants VB action
M0.2 = communication to VB, action needed
M0.3 = pulse of M0.1

correct me if I'm wrong
 
Thanks to all of you.


________________________________
"good":
Code:
|  M0.1    M0.3          M0.2
|---][------(P)-----------(S)---
|
first we need a pulse (positive flank detection), then we set/latch M0.2 so it can be reset/unlatched from outside
M0.1 = PLC wants VB action
M0.2 = communication to VB, action needed
M0.3 = pulse of M0.1

correct me if I'm wrong

That sounds good to me, I will try it and let you know.
 

Similar Topics

What is the best way to set a bit over an ethernet/IP network on an Allen-Bradley ControlLogix Series PLC from a Windows PC. We have a program...
Replies
7
Views
2,104
Hi all, Another odd question for you guys, Looking to try and set multiple bits to a single word register. Some context, I am using a Delta...
Replies
2
Views
1,699
I was loading a program onto an XE1e2 PLC and it got stuck on these two windows and won't progress. It won't let me connect from the PC to reload...
Replies
0
Views
72
I want to set user security level based on the value of a tag in my PLC called "ActiveUser". That tag will contain the A-P code which we use for...
Replies
6
Views
207
Hello, I have an automation direct d2 262 plc and C-more HMI EA9T6CL-R. I need to prepare a program, scheduled to be performed on a future date. I...
Replies
1
Views
117
Back
Top Bottom