12-12-2006 05:24 PM
12-13-2006 11:26 AM
12-28-2011 01:12 PM - edited 12-28-2011 01:14 PM
I am also yet to figure out how to retrieve any array that TestStand stores to a database; I’m using MS SQL. To clarify I have already written a waveform and an array of U16 to the db and have not been successful in retrieving them.
Does anyone have an example that is more up-to-date than the one mentioned above, preferably in LabVIEW and/or TestStand?
I will also settle for ideas and suggestions.
From what I can tell the array data is stored as a binary that needs to be parsed depending on the representation used to store it. Also doing a quire from the SQL management studio it appears as though endianness is going to come into play.
I have attached an array of the data that was stored as an R8 that has a total of 100 elements that first value is 0 last value is 99, between first and last values increment by 1. The binary data was returned in hex form in the SQL manager query.
Thanks
12-29-2011 06:28 PM
Hi Herrlin,
You might want to check out the Database Connectivity Toolkit for LabVIEW - (http://sine.ni.com/nips/cds/view/p/lang/en/nid/209060 )
This video gives a brief explanation of how to setup a database (although it’s Access) for TestStand (http://zone.ni.com/wv/app/doc/p/id/wv-555)
This is also an older example, but I don’t think too much has changed from TestStand(http://zone.ni.com/devzone/cda/tut/p/id/3604)
What versions of TestStand and MySQL are you using? Maybe I can come up with better examples.
Regards,
Michael Miracle
NI Americas | AE
NI.com/support | 1866-275-6964
12-30-2011 11:43 AM
Michael
Thank you for the reply, but my question was way more specific then the material you referenced. I have no problem setting up a db or having TS log to a database. My problem is getting array information back out of database once it is logged. Anyway I have figured out what I need to do in order to get the array data back out in a form I can use, I will post my approach in a couple of minutes.
Also just as a FYI I am using TS 2010 f1 (4.5.0.330) (when is TS 2011 dropping) and Microsoft SQL Server Express Edition (SQL Server 9.0.5000) not My SQL.
Thanks
12-30-2011 12:08 PM
So I was able to make use of the array data that TS stores as a binary (image) in my database by doing the following three things.
See functions and stored procedure attached
Something to consider
I have not gotten into what it would take to pull the arrays back into TS or LV as it is currently outside the scope of my project. But if I ever venture down that path I will try and post an update
herrlin