You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old November 16th, 2009, 02:18 AM   #1
macgioo2
Member
Ireland

macgioo2 is offline
 
Join Date: Oct 2009
Location: Bournemouth
Posts: 85
plc heartbeat

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.
  Reply With Quote
Old November 16th, 2009, 02:44 AM   #2
rdrast
Lifetime Supporting Member
United States

rdrast is offline
 
rdrast's Avatar
 
Join Date: Apr 2003
Location: South Carolina Lowcountry
Posts: 3,867
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.
__________________
------------------------------------
How to ask questions the SMART Way!

Look First, Ask Second!

  Reply With Quote
Old November 16th, 2009, 10:38 AM   #3
lectrofly
Member
United States

lectrofly is offline
 
Join Date: Sep 2009
Location: Iowa
Posts: 25
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.
  Reply With Quote
Old November 16th, 2009, 04:51 PM   #4
Eddie Willers
Member
United States

Eddie Willers is offline
 
Eddie Willers's Avatar
 
Join Date: May 2002
Location: Grand Central Station
Posts: 590
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.
  Reply With Quote
Old November 23rd, 2009, 05:26 AM   #5
macgioo2
Member
Ireland

macgioo2 is offline
 
Join Date: Oct 2009
Location: Bournemouth
Posts: 85
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!
  Reply With Quote
Old November 26th, 2009, 02:38 AM   #6
macgioo2
Member
Ireland

macgioo2 is offline
 
Join Date: Oct 2009
Location: Bournemouth
Posts: 85
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
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
PLC Programming.... or what... cars & motorcycles? Terry Woods LIVE PLC Questions And Answers 57 September 26th, 2013 10:06 PM
Rant about Safety brucechase LIVE PLC Questions And Answers 25 August 11th, 2009 12:08 PM
PC to PLC Protocol TheRixta LIVE PLC Questions And Answers 13 December 17th, 2008 12:56 PM
Upgrading PLC 5/25 to PLC 5/30. What to take good care of? ckchew666 LIVE PLC Questions And Answers 4 August 18th, 2005 09:14 PM
Normally open or closed or... Phil Melore LIVE PLC Questions And Answers 15 February 3rd, 2003 07:14 PM


All times are GMT -5. The time now is 01:09 PM.


.