Suggestions on how best to display SQL data on RsView screen.

SonicClang

Member
Join Date
Oct 2008
Location
Verona, WI
Posts
12
I'm wondering if anyone has any suggestions on how best to display SQL data on an RsView screen. As the operator is processing a batch we're recording data to the SQL database. I have a view setup in SQL already that displays the run from the currently running batch, and supervisors are already monitoring that information from an Access interface.

I can successfully display it if I use the Microsoft Chart 11 engine through an ActiveX control, but it's not quite as friendly as I'd like. I don't know of a way to refresh the data at run time, and the operators can right click on it and get into a bunch of options I'd rather keep them out of.

I have some VBA experience but not in RsView, although I'm willing to learn some if it gets me what I want. I opened the sample file that came with Rsview and there's a form report in the coffee section of the program that looks like it would fit our application, but the VB looks pretty complicated.
 
Sonic,

First, a question: Did the "SQL Data" originate in the RSView program, or in a PLC? If so, the easiest thing is to create another RSView graphic screen, similar to the attached. Use String Displays and Numeric Displays to show any type of data in rows and columns. On this screen, the Fuel Used and Total Time of Operation are internal calculated expressions using other tag names. The screen is formatted so that it can be printed out and mailed to the state bureau of air quality.

http://www.plctalk.net/qanda/attachment.php?attachmentid=10002&stc=1&d=1238512867

RSView Sample Data Display Screen.jpg
 
Last edited:
Thank you for your reply Lancie1, I just noticed it now. Shortly after I posted this original question I figured out how to do what I wanted to do. Using an ActiveX control, and plugging in the Microsoft Spreadsheet 11.0 control, I'm able to do 100% of what I needed. It's part of the Microsoft Web Components download, available about Microsoft's website actually if you don't have it. It connects to the SQL server and displays the data for the operator. The problem I originally posted about where I couldn't refresh the data was solved by using the invoke command. Invoke.display.ActiveXControlName. So as the machine is running I have an event running that refreshes the spreadsheet every 30 seconds.

As the data set grows, the control adds more rows. I'm sorting descending, so as the data set gets big enough, the operator can scroll down to see the past information if needed. The data I'm bringing into the plugin is the exact same data I'm printing at the end of the run in an Access file, connecting to the same data source on the SQL server. The whole point of this is to get rid of the paper run sheet our operators currently fill out by hand as the run is processed.

To answer your question, the data is originating in the PLC. It's logged to the SQL server every 2.5 minutes, or when a process parameter is changed by the operator. You wouldn't want to try to store this much data in the PLC or memory tags in RsView.

Another trick I just figured out today is how to open an Access file from Rsview. Using the Appstart command, calling Access, then the file name. So I have an Access file with some nice reports that I print when the run is finished. I have an Autoexec macro that opens each report, prints them, and then quits Access.

Man this stuff is fun.
 

Similar Topics

I'd like people's opinions on which manufacturer of hardware they prefer. We are an aerospace manufacturing facility that does little to no SCADA...
Replies
10
Views
483
I am setting up control for Hypochlorite dosing. The easy part is the dosing calculation for flow pacing but I would also like to setup trimming...
Replies
8
Views
895
I'm working on an application and have hit a bit of a snag. I need to find an industrial touchscreen display that can: - Tolerate down to -40C...
Replies
7
Views
718
Hello Everyone, I am reaching out to this knowledgeable community with a peculiar problem I've been experiencing with a PLC 5/40E. This issue has...
Replies
16
Views
2,209
Hi, I have never used modbus communication in Codesys 2.3, any tips and tricks are much appreciated. The system is a Wago 750-881 that controls...
Replies
3
Views
1,766
Back
Top Bottom