Get column from SQL server to wonderware

Xero0620

Member
Join Date
Mar 2019
Location
Texas
Posts
3
I’m trying to get data from a column in sql server to post in wonderware.

My select script is as follows

ResultCode=SQLSelect(BatchTotalizerConnectionId,”Test1”,”Test1BindList”,””,”Batch_Date2”);

Everything connects and writes to the database.

I have a simple chart setup with 3 “#” on it. First # tag is Batch_Date2 then goes to Batch_Date3, and so on.

Trying to get the report in the sql database to display in wonderware as it does in sql server.
 
Welcome to the PLCTalk Forum community !

Is this Wonderware InTouch, or Wonderware "Machine Edition" or "InTouch Edge HMI", which are brand labels for Indusoft Web Studio ?


Your "Batch_Date2" and "Batch_Date3" tags look unique, rather than being part of an array, where they would be "BatchDate[2]"


Does the first Tag get the value you expect ?
 
oh boy, not trying to derail this post, but every time i read about a database query not working , i think......

PEOPLE, HAVE YOU NOT LOOKED INTO INDUCTIVE AUTOMATION'S IGNITION?
 
I have.

But because we make extensive use of NumPy and SciPy, we cannot make do with a Java-based Python that does not allow us to use those libraries.

Nor can we deal with a heavy server based SCADA architecture that is inappropriate for our HMI-centric machine needs.

Nor can we circumvent an ironclad IT standard at our biggest customer that badly restricts the Java versions that can be installed.

It's a fantastic product and I love how it looks and it makes SQL integration like falling off a log.

But it's not appropriate for everybody's needs, and it helps exactly not at all when somebody is trying to figure out the arguments for an Indusoft Web Studio function.

Forgive me for my crankiness. I have spent the week attempting to modernize somebody's heavily VBA-dependent RSView SE 4.0 application from 2006.
 
I’m using Intouch wonderware.

Right now I’m just using this as a test to see if I can get it to work everything is memory messages. . The bind list setup is

Tag.fieldname = Batch_Date0, Column name = Batch_Date1

The sql data table setup is

Just single column named Batch_Date1, it’s recording a user input date (Batch_Date0)

I’m trying to get the date or dates in the sql table to display on a simple chart made in wonderware. Tags are Batch_Date2, Batch_Date3, etc.

The ultimate goal is for the wonderware screen operator to be able to see a chart of recent batches, say the first 10 on the query and then also be able to input a date and narrow down the query.

Right now I’m just focused on the display of the data. The connect to sql and write to sql work I just can’t get the read and show to work at the moment.
 
I wrote some code some years ago that selected a number of recipe names from an SQL database and populated a dropdown list box on Movicon scada
The code:
Conn1.ConnectionString = "dsn=WRKDB;uid='WRKREC';pwd='nova';"
SQLStr = "SELECT Rec_Name,Description FROM Recipe_Headers WHERE Rec_Type=" & Format$(RecType) & " ORDER BY Rec_Name"
Conn1.Open
Rs1.Open SQLStr,Conn1,,,
x = 0
Rs1.MoveFirst
While Not Rs1.EOF
Combos(x) = Rs1.Fields(0).Value
DescriptionArr(x) = Rs1.Fields(1).Value
x = x +1
Rs1.MoveNext
NumRec = Rs1.RecordCount
If x > 299 Then Exit While
Wend
Rs1.Close
Set Rs1 = Nothing
Conn1.Close
Set Conn1 = Nothing
 
Script para obtenção de Dados do Sql para o FactoryTalk.

Boa tarde, estou precisando de uma ajuda.

Alguém sabe como fazer para buscar dados do Sql Server e mostrar este no meu monitor FactoryTalk?

Sabem de algum script para fazer esta leitura?

Agradeço a colaboração.
 

Similar Topics

Hello All how to compare SQL table's columns in InTouch and reflects result in InTouch Tag to start logging in another SQL table... 1. I have...
Replies
0
Views
2,911
In a data block, if the tag is ticked in the "Retain" column", is it meant to be retained after cycling the power to the PLC? I'm finding that...
Replies
2
Views
665
i have 4 tags that i am collecting data on in a log file. is there a formatting available to put each tag in a separate column instead of having...
Replies
1
Views
1,379
I am using Indusoft Version 8.1, and trying to use the VBScript button command to find a string in a column in a MySql database, and return all...
Replies
36
Views
8,668
Hello guys! I have a ARRAY[0..2047,0..3].. I want to have column by column, how can I read it? Data := ARRAY[0..2047,0..3] OF STRING; In Matlab...
Replies
0
Views
1,185
Back
Top Bottom