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 January 6th, 2020, 06:07 PM   #1
sixcloud
Member
United States

sixcloud is offline
 
Join Date: Jan 2020
Location: Houston, TX
Posts: 1
FactoryTalk Parameter Tag Comparison as Literal String

Hello!

I have review PLCS at least half a dozen times and it occurred to me I might be able to crowd source a solution for something I have been working on.

I am using FactoryTalk View SE 11 taking advantage of KepServer to create an OPC from the controller's Modbus table. One of the items we reuse on the regular is diagnostic pages for displaying information from our controller.

I am attempting to add function to my diagnostic pages to allow the user to highlight any number of tags (up to 16) to send to a trend object. I have successfully added this function using VBA and local HMI memory tags (if interested, pm me and i'll be happy to share).

Ironically I thought the worst was over. I'm trying to now create the "highlight". I want this function to persist between page visits. Allow me to briefly explain a few relevant details.

1. I have 16 HMI memory string tags. Custom_Trend\Trend_Hold_xx.
--These hold the strings I eventually send to the trend object. They
initialize to "empty' and are reset back to "empty" if the user deletes
the tag from the list

2. The memory tag strings are partial KEPServer references. Partial only because the final portions of those HMI tags (the actual tag) is missing. Think "UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1". The complete reference would be like "UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1.VALUE" .

3. The diagnostic pages are reused a lot. I would like to limit how much work I do to prep a project. The page is made up using multiple copies of a global object that contain a few common at-a-glance details (TAG, DESCRIPTION, CURRENT VALUE, ENGINEERING UNITS). Also, a checkbox that has VBA which locates empty HMI memory tags and fills the first one it finds with the partial KEPServer reference. This works great.

4. The global object is fed parameters from a parameter file (Display DIAG /P PRAM_FILE_NAME). The global object #1 is tied to #201 in the parameter file. #201 in the parameter file is a partial KepServer reference like UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1

5. Finally, and this is where the issue is, if the partial KEPServer reference exists in one of the memory tags strings, highlight the line item (green rectangle that is visible/invisible).

>>>> The Problem <<<<

If I set up an expression where it attempts to compare the #1 to the {Custom_Trend\Trend_Hold_1}, this fails. #1 in the global object is supplied #201 from the parameter file. #201 in the parameter file is something like UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1. What appears to be occurring is FactoryTalk is treating #1 which is currently holding #201 , which itself is holding UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1 as a substitution and not as a literal string.

I need to compare #1 (which is structured like a KepServer reference) to a HMI memory string tag:

If #1 == {Custom_Trend\Trend_Hold_1} Then 1 Else 0

The produces an error. What resolves is #1 is replaced with #201, and #201 is holding UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1. FactoryTalk attempts to find UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1, which doesn't exist in KepServer. I don't need FactoryTalk to perform the substitution for this comparison, I need it to compare UNIT_1.MACHINE_NAME.CONTROLLER.SLOT_1.CH_1 as a string to Trend_Hold_1.

Any ideas?
  Reply With Quote
Old January 9th, 2020, 07:15 AM   #2
crawler009
Member
Switzerland

crawler009 is offline
 
crawler009's Avatar
 
Join Date: Feb 2012
Location: Planet Earth
Posts: 226
Hi sixcloud

a very interesting stuff you are doing there.
One question first: how are you making "local HMI memory tags"?
Do you create tags through vba in tag folders?

To your problem.
Dont you think it would make more sense to perform comparision in vba? The parameter files and parameter tags are so limited and basic in FTV. With vba you manage a lot easyer the indirect references, and parsing of the (tag) strings.
Just for your info, its also possible to access vba functions on another display, for example to set or read a vba variable on another display.

Best regards
Dorian Hildebrandt

Last edited by crawler009; January 9th, 2020 at 07:20 AM.
  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
FactoryTalk View Tag Import colemaj1 LIVE PLC Questions And Answers 4 October 5th, 2017 11:54 AM
FactoryTalk Me String Input Enable - How to Display String Contents Before Modifying ControlSysNick LIVE PLC Questions And Answers 1 May 11th, 2016 04:24 PM
RS Linx Classic Read Only ronman LIVE PLC Questions And Answers 26 October 11th, 2013 10:44 AM
ControlLogix and Devicenet Christoph LIVE PLC Questions And Answers 16 October 5th, 2013 11:17 AM
[ControlLogix] Converting STRING to a TAG ahussnain LIVE PLC Questions And Answers 7 December 8th, 2005 06:06 PM


All times are GMT -5. The time now is 11:37 PM.


.