TrendX Wrapper in RSVIEW 7.40

FSEIPEL

Member
Join Date
Nov 2013
Location
cOLUMBUS OHIO
Posts
27
I'm trying to update our antiquated trending. I'm still relatively new to A/B having worked with it only for about a year. What I WANT is DeltaV Trendbuilder-like functionality, where operators can click on a tag on the screen, and add it to a plot with a single click, without needing to browse for it in the datalog. I am working on achieving this using the TrendX Wrapper control, since it can be manipulated programatically/dynamically. So I was able to add a pen using a command such as:

Invoke CustomTrend.RSView32RSTrendXWrapper1.Pens_Add("TE242","DescriptorForLegend","Units e.g. deg F",0,100,"Datalog9")

where CustomTrend = Screen Name, RSView32RSTrendXWrapper1 = ActiveX RSTREND Wrapper Object, TE242 = Tag, 0, 100 = min and max, and Datalog 9 = Datalog name.

I wanted my generic faceplate to display 'add to plot' and 'plot this tag alone' buttons. 'Add to plot' will of course, add that tag with whatever tags are already on the trend, when clicked. I can use
Invoke CustomTrend.RSView32RSTrendXWrapper1.Pens_RemoveAll to clear the pens before adding 1st pen so this isn't a problem either. I'm running on a dual-headed display (just updated project to handle that ourselves), so plot appears on lower screen, and operator graphics on upper screen.

Issues I am having:

1.) How does one insert a double quote character? I realize this is a very basic question. Absent any guidance, best I could come up with, was to set a memory tag equal to double quotes, and then invoke with my placeholders, for instance, using

Invoke CustomTrend.RSView32RSTrendXWrapper1.Pens_Add($DQ$#1$DQ$,$DQ$#2$DQ$,$DQ$#3$DQ$,#4,#5,$DQ$#6$DQ$)

where DQ = tag set to double quotes. Is there a better way? This works but is hard to read. Above call is that made by the button you click on the faceplate of a given tag to add it to trend.

2.) This doesn't exactly relate to plotting, but since we programmed two sets of screens, faceplates always open on first monitor, is there a way to automatically determine which monitor a user is on and open screen on that monitor or must we hard-code it for each screen using DISPLAY with the coordinate parameters?

3.) Even with quotes, I still can't seem to use spaces in legends. I can use underscores, but any spaces in the channel descriptors causes the Invoke to fail. Can one pass spaces, and if so, how do you experts do it?

4.) I'd like legend to appear at bottom of plot. I'm not a total idiot and realize how to set this in the properties. However, with the wrapper control, the legend shows up at the bottom, instead of top left, but as soon as I save document, it moves to top left! Can I set this programatically with INVOKE, LOAD a template with screen, or some other workaround? Or is there something obvious I'm missing?

5.) I've been experimenting with other plotting solutions; I have a large datalog logging to a SQL server. It dumps ~350 points every minute. I can then query them in Excel and have Excel generate an HTML file to allow me to view the data using the open source dygraphs library allowing panning and zooming & turning trends on and off. I'd like to move this completely to a webserver & was wondering if anyone had done that before, e.g. select tag names & have it plot them with dygraphs? I don't have much experience executing the SQL query in a web scripting language but I can probably cobble something together... But if it's been done before, I'll take your code!

I've also been learning how to use my old 1756-eWeb card. I was able to write an Excel VBA function to retrieve the present value of any tag when passed the tag name and it works great, albeit it isn't terribly fast. Has anyone made any updates/upgrades to the 1756 Data Toolkit they'd be willing to share?
 
On further research, I was able to resolve the spacebar issue by entering the special character ALT+255 in its stead. This generates a character that isn't a space, but looks like one onscreen and acts like one in the parameter name (i.e. it doesn't trip up the INVOKE commnad). It does not matter if ALT+255 is enclosed in double quotes. For the faceplate, I also added Invoke CustomTrend.RSView32RSTrendXWrapper1.Pens_RemoveAll to the button to remove all trends just before adding, for the code behind the operator pushbutton to plot a single trend (the tag you clicked upon to bring up faceplate); the code to add a trend to existing faceplate includes only the Invoke CustomTrend.RSView32RSTrendXWrapper1.Pens_Add($DQ$ #1$DQ$,$DQ$#2$DQ$,$DQ$#3$DQ$,#4,#5,$DQ$#6$DQ$).

One other question I was curious about is if there is a way to detect what operator last clicked (tag name) to just add it to trend, as in DeltaV?

Placeholders still must be in quotes, only reason I can figure there is RSVIEW32 only parses the line once, not twice, but that's a guess -- i.e. placeholders are replaced with literals OR literals are enclosed in quotes, but not both.
 

Similar Topics

What is the difference between TrendX and TrendX wrapper? and when we will choose either them for our application? Anyone can give some teach?
Replies
0
Views
3,454
Factory Talk used to use a trending product called TrendX. GE uses a product with the same for displaying archived data in their Proficy View HMI...
Replies
0
Views
1,497
Hello, I have one computer where the trends fail to create a history log. The first time you open a trend ( on project load ) it says "failed to...
Replies
1
Views
1,941
Hello everybody. Please help solve the problem. In Factory Talk part of the tag has been moved from one log file to another. Now I need to make...
Replies
0
Views
1,274
Hello All, I need RSTrendX .ocx File. I've been searching the Net for over an hour and no luck. Can you please help me if you know where to get...
Replies
9
Views
4,800
Back
Top Bottom