Ifix Push Button ?

atifplus

Member
Join Date
May 2007
Location
Surrey
Posts
121
eee


i was trying

if tag = 0 then
writevalue tag = 1;
( maybe i need some delay here )
writevalue tag = 0;
else
writevalue tag = 0;


Dont worry about the syntax i am just looking for some ideas or some functions that i might not know.
:(
 
Last edited:
For PushButtons toggledigitalpoint "fix32.mynode.mytag.f_cv" is a good one, saves you having to the if then else code?
 
What exactly are you trying to accomplish with the pushbutton? Do you need momentary, toggle, or latch/unlatch functionality...Let us know.
 
oh i get it working..
aa what i am trying to accomplish is a 5 min bypass soft button


so if the operator press the button on ifix it stays on for 5 mins.

first i tried with a button (ifix) that sets the value of a internal coil to 1 but then after the timer expired the value of that coils stays the same so using the ifix i added a small loop of 5 min that resets the value of the internal coil to 0

It doesn't sound safe though wonding if i could something in the PLC ladder..
 
Use the following code in the PLC.


soft_button.JPG



Then you can SET (turn on) the HMI_Button variable using iFix and the PLC will take care of turning the variable off at 5 minutes later.

I would not recommend using a delay timer in iFix as it will tie up the application (during the delay loop). The PLC is always scanning, so why not use it to trigger a timeout event. It is much cleaner IMO.
 
Last edited:
atifplus said:
oh i get it working..
aa what i am trying to accomplish is a 5 min bypass soft button


so if the operator press the button on ifix it stays on for 5 mins.

first i tried with a button (ifix) that sets the value of a internal coil to 1 but then after the timer expired the value of that coils stays the same so using the ifix i added a small loop of 5 min that resets the value of the internal coil to 0

It doesn't sound safe though wonding if i could something in the PLC ladder..

I sure wouldn't do that in ifix. It's running on a PC, which is the weakest link in your control system. If that PC happens to go down or the connection to the plc is lost during the 5-min bypass, what would happen?? I always recommend doing all of the control in the PLC -- use the HMI to interface with it, but don't do the actually control with the HMI. Use the HMI to start the timer, but don't have it run the timer...
 
abwiz said:
Use the following code in the PLC.


soft_button.JPG



Then you can SET (turn on) the HMI_Button variable using iFix and the PLC will take care of turning the variable off at 5 minutes later.

That is exactly i am looking for I couldnt able to set the variable back though.

I got this logic below .. C17 is the bypass aa the only thing i dont like is that i have to hit the C15 for activating the timer then once the timer expire i have to hit the HMI button once to reset then hit again to restart it ..
C15 is the HMI button



checkrc3.jpg
 
OZEE said:
I sure wouldn't do that in ifix. It's running on a PC, which is the weakest link in your control system. If that PC happens to go down or the connection to the plc is lost during the 5-min bypass, what would happen?? I always recommend doing all of the control in the PLC -- use the HMI to interface with it, but don't do the actually control with the HMI. Use the HMI to start the timer, but don't have it run the timer...


yeap i am trying to implement on the PLC :( totally agree
 
Make the HMI activation of C15 momentary. Just long enough for the PLC to latch in C17. Then on the timer, replace C15 with C17. Move the timer rung below the C17 rung, then when C15 goes true, C17 will seal in and start the timer, when the timer times out, C16 will go true and drop out C17, which will also reset the timer. Then you're ready for the next cycle.

Note this will make your time delay the timer value, plus one scan, may or may not be an issue.
 
Ken Moore said:
Make the HMI activation of C15 momentary.

How about using the one shot :)

and then reset the C15 using IFIX <-- this part i dont like. can we do something in PLC .. why I cant write back on the C15 seems like FIX is keep writing the value



Codes for the push button on IFIX :0

Private Sub Rect93_Click()
Dim PauseTime, Start, Finish, TotalTime
PauseTime = 1 ' Set duration.
Start = Timer ' Set start time.
WriteValue "1", "Fix32.SCADA1.Overwrite.F_CV"
Do While Timer < Start + PauseTime
DoEvents ' Yield to other processes.
Loop
WriteValue "0", "Fix32.SCADA1.Overwrite.F_CV"
Finish = Timer ' Set end time.
TotalTime = Finish - Start ' Calculate total time.
End

End Sub
 
yea

I included one shot to be on the safe side if by chance that com failed b4 resetting the C15 and one shot will take care of it



logicdsdh9.png
 

Similar Topics

Hello everyone, Does anybody know if there is a way of simulating the behaviour of a FTV momentary push button on iFix? I am trying to create a...
Replies
5
Views
1,781
Do you need to use scripting to have a momentary push button in IFIX 5.8?
Replies
14
Views
6,642
Hi I have a ifix 5.5 application where the operator opens a valve by clicking on a screen object. I can trace from object to data base that it is...
Replies
2
Views
42
Dear all, I am beginer in ifix hmi programming. I have 2 ifix 6.0 pc with license FiX and client.. Can some one tell me how to configure sample...
Replies
0
Views
160
Hello, I have to deal with iFix again and am looking at the most efficient way to create alarms to display in iFix, i.e. not creating an...
Replies
0
Views
166
Back
Top Bottom