Need to TimeStamp on a bit condition.

jucofan

Member
Join Date
Sep 2007
Location
GA
Posts
5
I am using iFix 4.5 with drivers (ABR and IGS) configured to communicate with a PLC-5, a SLC5/05, and a ControlLogix 5500 processor, all over Ethernet. I am trying to figure out a way to put the current system time on the screen when a bit in one of the processors goes true. For example, when B3:0/0 in my PLC5 goes true, I want the current system (not PLC) time on the iFix screen. The idea is to log start/stop times, etc easliy on a screen, and not dump into an external DB or spreadsheet.

It has to be done on a bit condition, and not by operator input. I thought I had it figured out, and it works almost perfectly. I used the event tag in iFix (named it Event1) to look at the bit in question. OnTrue, the condition is set, and I run a script to change the caption of a pre-set text field (called TimeStampText). My code looks like this:

Private Sub Event1_OnTrue()
TimeStampText.Caption = CStr(Now())
End Sub

It works perfectly every time the condition goes true. The caption changes from TimeStampText to the current System time. However, the problem is that any time I change screens and go back to the main screen, the tag caption updates with a new system time, even if the status of the bit has not changed. In short, the Event works, and so does the caption change, but the script is run every time the screen is loaded, so even though the condition has not changed, a new system time is updated.

How can I keep this from happenening, or is there another way to write the script or event to prevent this? The ONLY time I want the system time to change is when the bit changes state.

Thanks!
 
It has been a long time since I did any thing in iFix but the logical way to do this would be on a glopbal script rather then a local window script. Set the time stamp to a variable and update the lable text with the static varable value. This way the event scope never changes from window to window but stays with the scope of the entire application.
 

Similar Topics

I have an old Sentry Palletizer (S/O Number 3007 / Serial Number 1172) that has lost its program as the backup battery died years ago. I can...
Replies
0
Views
103
So i've been at this for a long while, i have Citect Scada 2018, i have full access to everything but i can't seem to find any option or...
Replies
0
Views
67
I've got this 3-phase 575V motor that we're controlling with a VFD (Variable Frequency Drive), which has been quite the learning curve in itself...
Replies
10
Views
309
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
11
Views
377
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
194
Back
Top Bottom