01-10-2012 06:51 AM
Hi,
I am trying to change a variable in procedure which already created and saved in system definition file. I want to invoke that sys def file, change the procedure and deploy it on CRIO through LabVIEW. Is that possible ..?? If so Plz help me in this regard.
VJK
Solved! Go to Solution.
01-10-2012 10:50 AM
Procedures are defined in the system definition. The system definition gets compiled, deployed, and then runs on the execution target. If you literally want to modify a procedure, you'll have to change the system definition offline then redeploy it. There's probably a better way to get the end behavior that you want - either with a user channel, several procedures used together, maybe the execution API, or something else; but you'll need to describe your use case and requirements before we can give a solid recommendation. What exactly are you trying to accomplish?
Steve K
01-10-2012 11:56 AM
My question is how can I change the value of a Variable defined in procedure by using VeriStand APIs in LabVIEW. The aim is to have a GUI in LabVIEW where user
will set the value for the variable which is already defined in system def file and save the sys def file. After that the sys. def. Shall be dumped into the CRIO. I don't
want to open the system definition file and set the value of a variable in procedure manually. Every thing need to be done through labview from changing the value of
variable till dumping into the CRIO. I hope that my query is clear.
01-10-2012 04:29 PM - edited 01-10-2012 04:30 PM
The Procedure steps named "Set Variable" and "Set Multiple Variables" set VeriStand channel values. Either step requires a "Channel to Set". You can set "Channel to Set" to any one of the following:
If I understand your case correctly, you can define a User Channel in the system definition called "Variable". Create a "Set Variable" step in your procedure, and configure the step to set the output channel with the "Variable" channel. The operator can change the value of "Variable" from the workspace, or by using the SetSingleChannelValue method, which is on the palette.
Steve K
01-10-2012 11:33 PM
01-11-2012 11:18 AM
You might find the attached example useful. It doesn't change a procedure... but it does a lot.
To see how procedures are used in the sysdef API, see here:
C:\Program Files (x86)\National Instruments\LabVIEW 2011\examples\NI Veristand\API\System Definition API\Create a SDF File with Procedure.vi
You could use both of these references to assist in creating your own functionality.