Jump to content

SPC Stats Visualization - TestStand database - Python Pandas


Recommended Posts

Hi There 

I want to go from TestStand's output i.e. database to HTML5 SPC charts. Sorta like http://moderndata.plot.ly/using-plotly-from-labview-via-python/ Has anyone done this or used Bokeh or Enthough's data tool before?  What about these tools with TDMS or HDF5?

Thanks. I appreciate it.

Best,

Pavan 

By the way, https://www.enthought.com/services/consulting/case-studies/TAIPAN/ (like TestStand without TestStand)

 

Link to post
Share on other sites
2 hours ago, planet581g said:

I've gone from TDMS to Plotly using Python. There's a guy who maintains a Python module for importing TDMS data to Python on GitHub. I've used it successfully on one project so far.

https://github.com/adamreeve/npTDMS

Plotly is a rest API (V1, V2). You don't need (nor should want) Python. Just use the HTTP VIs in LabVIEW.

Edited by ShaunR
Link to post
Share on other sites
15 minutes ago, ShaunR said:

Plotly is a rest API (V1, V2). You don't need (nor should want) Python. Just use the HTTP VIs in LabVIEW.

Well that all depends. If you've got TDMS files that you want to post process and or analyze, Python might be exactly what you want. That was the case for this particular project. It was considered advantageous to not require LabVIEW. Plotly was just used as the visualization tool after post processing the data.

If the goal is to create some data in LabVIEW and display it in Plotly, then I agree that you shouldn't need to bring another language into the mix.

I still think it's great that Adam Reeve put a tool out there that allows us to read TDMS without requiring LabVIEW!

Link to post
Share on other sites
10 hours ago, planet581g said:

Well that all depends. If you've got TDMS files that you want to post process and or analyze, Python might be exactly what you want. That was the case for this particular project. It was considered advantageous to not require LabVIEW. Plotly was just used as the visualization tool after post processing the data.

If the goal is to create some data in LabVIEW and display it in Plotly, then I agree that you shouldn't need to bring another language into the mix.

I still think it's great that Adam Reeve put a tool out there that allows us to read TDMS without requiring LabVIEW!

I wouldn't use Python for this just like I wouldn't use PHP - right tool for the right job and with NI support, which is second to none.

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Similar Content

    • By drjdpowell
      View File JSONtext
      Package for working with JSON.  Uses high-speed text parsing, rather than building an intermediate representation as with prior LabVIEW JSON libraries (this is much faster).  Allows easy working with "subitems" in JSON format, or one can convert to/from LabVIEW types.  Uses the new "malleable VIs" of LabVIEW 2017 to convert to any LabVIEW type directly.
      JSON text makes use of a form a JSON Path notation, allowing easy and rapid access to the subitems of interest.
      Requires LabVIEW 2017 and install by VIPM 2017 or later.
      Original conversation about JSONtext.
      On the LabVIEW Tools Network.
      JDP Science Tools group on NI.com.
      Copyright 2017 JDP Science Limited
      Submitter drjdpowell Submitted 08/02/2017 Category General LabVIEW Version 2017 License Type BSD (Most common)  
    • By drjdpowell
      Package for working with JSON.  Uses high-speed text parsing, rather than building an intermediate representation as with prior LabVIEW JSON libraries (this is much faster).  Allows easy working with "subitems" in JSON format, or one can convert to/from LabVIEW types.  Uses the new "malleable VIs" of LabVIEW 2017 to convert to any LabVIEW type directly.
      JSON text makes use of a form a JSON Path notation, allowing easy and rapid access to the subitems of interest.
      Requires LabVIEW 2017 and install by VIPM 2017 or later.
      Original conversation about JSONtext.
      On the LabVIEW Tools Network.
      JDP Science Tools group on NI.com.
      Copyright 2017 JDP Science Limited
    • By Bryan
      TestStand Version(s) Used: 2010 thru 2016
      Windows (7 & 10)
      Database: MS SQL Server (v?)
      Note: The database connection I'm referring to is what's configured in "Configure > Result Processing", (or equivalent location in older versions).
      Based on some issues we've been having with nearly all of our TestStand-based production testers, I'm assuming that TestStand opens the configured database connection when the sequence is run, and maintains that same connection for all subsequent UUTs tested until the sequence is stopped/terminated/aborted.  However, I'm not sure of this and would like someone to either confirm or correct this assumption. 
      The problem we're having is that: Nearly all of our TestStand-based production testers have intermittently been losing their database connections - returning an error (usually after the PASS/FAIL banner).  I'm not sure if it's a TestStand issue or an issue with the database itself. The operator - Seeing and only caring about whether it passed or failed, often ignores the error message and soldiers on, mostly ignoring every error message that pops up.  Testers at the next higher assembly that look for a passed record of the sub assemblies' serial number in the database will now fail their test because they can't find a passed record of the serial number. 
      We've tried communicating with the operators to either let us know when the error occurs, re-test the UUT, or restart TestStand (usually the option that works), but it's often forgotten or ignored.
      The operators do not stop the test sequence when they go home for the evening/weekend/etc. so, TestStand is normally left waiting for them to enter the next serial number of the device to test.  I'm assuming that their connection to the database is still opened during this time.  If so, it's almost as though MS SQL has been configured to terminate idle connections to it, or if something happens with the SQL Server - the connection hasn't been properly closed or re-established, etc. 
      Our LabVIEW based testers don't appear to have this problem unless there really is an issue with the database server.  The majority of these testers I believe open > write > close their database connections at the completion of a unit test. 
      I'm currently looking into writing my own routine to be called in the "Log to Database" callback which will open > write > close the database connection.  But, I wanted to check if anyone more knowledgeable had any insight before I spend time doing something that may have an easy fix.
      Thanks all!
    • By Srinivas Iyer
      Hello,
      I am trying to do the following (LabVIEW2019, TestStand2019, Windows 10)
      Create a new sub-property under RunState.Engine.TemporaryGlobals as Measurements.TestName_DateTimeStamp 
      My TS expression:
       //get a handle to runstate.engine.temporaryglobals
      Locals.tmp_prop_object = RunState.Engine.TemporaryGlobals,
      //create a new obj ref type property under this
      Locals.tmp_prop_object.AsPropertyObject.NewSubProperty(Locals.name1, PropValType_Reference, False, "",0),
      where Locals.name1 is Measurements.TestName_DateTimeStamp (e.g: RunState.Engine.TemporaryGlobals.Measurements.RxGain12_16_58AM)
      I now want to assign a LabVIEW class object to this property as:
      RunState.Engine.TemporaryGlobals.Measurements.RxGain12_16_58AM = Locals.tmp_obj_ref
      where Locals.tmp_obj_ref is the output terminal of a LabVIEW class and tmp_obj_ref is a TestStand variable of type Object Reference
      If I do it like this in the expression window, I can see that my RunState.Engine.TemporaryGlobals.RxGain12_16_58AM has been assigned a LabVIEW class object
      However, the value RxGain12_16_58AM is known to me only at run-time, so I cannot hard-code the assignment expression as above.
      Any pointers on how to achieve this?
      Basically if,
      Locals.name = "RxGain12_16_58AM" (created at run-time)
      then i want to be able to assign, during run-time:
      RunState.Engine.TemporaryGlobals.RxGain12_16_58AM = Locals.tmp_obj_ref


    • By MRedRaider
      15. FIFTEEN. That's the number of current job postings  in my group. We're hiring! This is the most fulfilling, challenging, and rewarding position I've held. Job specific requirements listed on the website.

      https://www.lockheedmartinjobs.com/search-jobs/Test%20Engineer/Grand%20Prairie%2C%20TX/694/1/4/6252001-4736286-4684904-4694482/32x74596/-96x99778/15/2
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.