取消
顯示結果 
搜尋替代 
您的意思是: 

toggle boolean switch

Hi,
I am doing a project where i should move the pusher with different pressure.the pusher goes in and out of the a certain material. When the pusher goes in it should be pushed inside with a low pressure. when the pusher goes out it should be pull out with a high pressure, so i want to control this with a boolean switch to switch between different states, this should happen automatically without manually having to switch the pusher pressure. so i want to know how do i toggle a switch programmatically.See the attached picture.
 
Thanks!!
0 積分
1 條訊息(共 10 條)
4,508 檢視
variable
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 積分
2 條訊息(共 10 條)
4,499 檢視

Hai,

Try using a flat sequence structure with specified time delay and give true and false constants to the boolean switch accordingly.

Mathan

3 條訊息(共 10 條)
4,496 檢視
right click on the control in your block diagram, select create->reference.  wire a property node to this, right click the property node, select "change to write" and choose "value," then just wire a true or false to it.
0 積分
4 條訊息(共 10 條)
4,486 檢視
Hi Jeff,

instead of "value" property nodes simple local variables will do the same, but faster 眨眼表情
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 積分
5 條訊息(共 10 條)
4,476 檢視
Ah, but locals also introduce race conditions
0 積分
6 條訊息(共 10 條)
4,463 檢視
So do propery nodes...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 積分
7 條訊息(共 10 條)
4,460 檢視
Property nodes have control outputs that can enforce data flow.  Locals do not.
0 積分
8 條訊息(共 10 條)
4,448 檢視
Granted, but if you can wire something into the property node that truely stops a race condition (other than a semaphore of some type) then you can wire the data directly to an indicated and have no purpose to the property node. The property node itself only ensures dataflow (as you said) and does nothing to stop any actual race condition.
In such cases the best bet would be to use a functional global anyways...but none of that has to do with the question that was asked...
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
0 積分
9 條訊息(共 10 條)
4,443 檢視

That's a valid point.

And more to the point of the question, why not just use the output of the button to control the pressure?  Why do you need a switch?

0 積分
10 條訊息(共 10 條)
4,434 檢視