plc heartbeat

macgioo2

Member
Join Date
Oct 2009
Location
Cambridge
Posts
98
Hi All,

I want to display the plc heartbeat on the hmi using a simple routine in the plc that sends out an integer to the hmi. Which in turn sends it back to the plc where is is incremented and resent. This is continuous.

I'm using Factory talk se vb scripting, as vb is event driven how do i get it to carry out this script continuously on a display that only loads once when the application is run for the first time?

Any help here would be great, thnaks.
 
Open the window with the switch /ZA for cached, always updating.

Display MyWindow /ZA

Note that in an SE Distributed System, you want to use exclusion guards (generally based on computer name) to keep most VBA code from running on multiple clients.
 
I would like to see that code when you get it working.

I would have probably used a free-running timer in the PLC set at 2 seconds or so and then created two heart shaped objects (one larger than the other) and given them visibility animations depending on the accumulator value of the timer.
 
I do my HMI -> Controller heartbeat with a Derived Tag, which is a feature of both RSView32 and FactoryTalk View SE.

I configure a Derived Tag to send the System Seconds value to the controller every 1, 2, or 5 seconds. In the controller, I use a timer to make sure the value being written by the HMI is changing. Sometimes I just log the time and duration that it stopped changing, sometimes I write a routine to perform a specific action like aborting a batch.

The Controller -> HMI heartbeat can be something visual like a value-animated tag, or more often I use the RSLinx pre-defined OPC item "@IsPresent" or "@Mode" as an alarm tag and let RSLinx worry about the timeouts.

I realize that this is not related to your original question about VB events and your data increment plan, but both of these are simple and proven mechanisms to monitor communications between an RSView-family HMI and a controller.
 
Thanks guys for your help.

I have only come back to this problem this morning.

The trouble I am having at the moment is that I don't know how to access the plc tags in the vba environment. I have tried every combination but still it gives me undefined object error for my tags.

Do i have to do the routine using local objects in vb and find some way then of writing to the plc tags from outside the vb environment.

I'm a bit confused this morning so any help would be much appreciated!
 
For anyone that is interested I have found a solution to the heartbeat problem.

It is possible to use an event,

expression= heartbeat_HMI <> heartbeat_PLC

action= heartbeat_HMI <> heartbeat_PLC

Run the event on startup and this will pass the integer between the plca and hmi.

I have not figured out how to do this in VB yet but I will post it if I do
 

Similar Topics

Hi everyone, I have a task at work that I'm hoping someone will be able to help me find a solution for. Here is the background info: I have a...
Replies
10
Views
378
Hello, I want to monitor Wonderware historian's heartbeat and trigger a fault if Historian is not communicating /offline in PLC. Currently my...
Replies
0
Views
776
I was wondering if anyone knew a way to go about creating a heartbeat between a PLC and an iFix HMI screen so that you can see when the PLC is out...
Replies
2
Views
1,853
Hello, I created a heartbeat in RSlogix 500, just a bit that toggles on and off every 3 seconds. How can I monitor the heartbeat using Vijeo...
Replies
1
Views
1,798
Good Day, We are stuck in a serious issue, please see below for details and give your valuable feedback. - There are two PLCs running on site...
Replies
5
Views
4,570
Back
Top Bottom