04-19-2013 05:09 PM
In a stimulus profile, I would like to have a while or for loop which, on each iteration, does an operation on a different channel. Is it possible to format the loop counter into a channel name in the stimulus profile editor?
For example, only iteration 1, I would like to set the value of channel 1. On iteration 2, I would like to set the value of channel 2, etc. Thanks.
04-22-2013 11:27 AM - edited 04-22-2013 11:28 AM
Hello Harris,
Unfortunately this isn't available currently in the stimulus profile to pull a loop's counter value. You can implment a local variable that increments after each iteration and stop the loop once it has reached a specific value. You'd then pass the value to your sequence that would apply to each channel based on that value.
Thank you and have a great day,
04-22-2013 11:49 AM
Hi Kyle,
Thanks for the response. I didn't quite understand what you were suggesting. Would you mind clarifying? For me, I'd like to be able to address a different channel on each iteration.
04-22-2013 03:21 PM
Hey Harris,
I appologize for the vagueness of my statement. No we can't work with strings on the RT side, you could maybe do something with a model or a custom device but I think this would be more work than you'd want.
Here is a picture from the editor of I think what the workaround would be. You could change the assignments to sequence calls and pass the reference of the channels you want to modify.
04-22-2013 03:27 PM
04-22-2013 03:49 PM
Harris,
Unfortunately you can't write a real-time test sequence in LabVIEW. You can control sequences but to actually write the sequence you'd write it in the profile editor.
The API allows you to programmatically control which tests are running. This alleviates the need to have an operator use the Workspace to control things if its not needed.
04-22-2013 06:00 PM
Hey Harris,
The above post isn't entirely correct... yes you can execute and interact with running real time sequences and stimulus profiles with LabVIEW (using the NIVS .NET API under the hood) but you can also use the NIVS .NET API to author and edit real time sequences and stimulus profiles.
Information on the .NET calls to do so can be found in the NIVS help file for the .NET API which is available in your start menu. Its called the "configuration API" (don't ask me why...)
There are some examples for authoring/editing real time sequences using this API from LabVIEW installed to <Program Files>\LabVIEW <2011 or later>\Examples\NI VeriStand\API
Unfortunately there are no installed examples for editing stimulus profiles... but the API is similar to the one for real time sequences so you should be able to figure it out. And also, if you're running the real time sequences from LabVIEW anyway... you may not need stimulus profiles at all.
04-23-2013 10:10 AM