12-07-2017 03:47 PM
Hello. First, I have never worked with, or know anything about the TestStand platform...please be gentle. I have a relatively simple task to accomplish, but have no idea where to start. The order of operations is as follows:
1. Operator scans a barcode (ID)
2. Pass the ID to an external SQL database using a stored procedure call
3. Receive the value returned from the SQL db
4. Flow control based on value returned
Seems simple enough, but the TS Sequence construction has me baffled. How would one use the Open/Close/Data Operation commands to make this happen? Steps 1 and 4 have been written and function properly. My hangup is creating the sequence steps to accomplish this.
Open/Close Database works, but I cannot write an Open SQL Statement that will work. Having said that....yes, the SQL db connection is good. When I use the "Database Viewer" I can query to my hearts content, and the stored procedure call works as expected. I'm in over my head here...again, I have no idea how to even manage variables or anything else in TS. I am a complete noob, and was asked to add this SQL check to an existing sequence. Any help appreciated. Thanks!!
Solved! Go to Solution.
12-07-2017 10:49 PM
Have you looked at the Database example that ships with TestStand yet? C:\Users\Public\Documents\National Instruments\TestStand 2016 (32-bit)\Examples\Built-In Step Types\Database Step Types
It shows how to use the Database step types.
Personally I'm not a fan of them. I create a LabVIEW VI that does my DB communication. Or you can call directly into .net assemblies from TestStand.
Local Variables would be the best options for passing information between steps that are in the same sequence.
Hope this helps,
12-12-2017 10:01 AM - edited 12-12-2017 10:10 AM
Thanks jigg. It took a lot of trial and error, but I now have the SQL portion working as intended. Yes, I used Local Variables to do the passing, as you suggested, and it works like a charm. The biggest hurdle was for me to learn the lay of the land with TestStand. Thanks again!