Search code examples
labviewdiagramming

Labview diagram creation API


I need to drive a testbench with labview. The test scenarios are written in a languages that can be automaticaly translated into labview diagrams.

Is this an API that allow to create "labview diagrams" from another software ? or with labview itself ?


Solution

  • I agree that LabVIEW scripting is one approach, but let me throw out another option.

    If you are planning to do a one time migration from your test code to LabVIEW than scripting is great, but if you plan to regularly update your test code (because it's easier to use the "test" language than LabVIEW) than it could become quite painful to constantly perform the migration every time your test code has changed.

    I've had great success with simply putting my state machine inside of a for loop and then reading in "commands" from a text file that was generated using my "test" language (see pic).

    For example, to do an IV sweep my text file might say something like:

    SourceV, 5
    ReadI
    Wait, 1
    SourceV, 6
    ReadI
    

    This image is greatly simplified - I'm not using a state machine and I don't show how to use "parameters," but I can provide a more comprehensive example if needed. Again, I've had great success doing this with around 30 "commands" controlling multiple instruments and then I generated the text input using VBA or Python. enter image description here