08-21-2007 09:50 AM
08-29-2007 01:11 AM - edited 08-29-2007 01:11 AM
Message Edited by ThSa on 08-29-2007 08:16 AM
09-01-2008 03:20 AM
Hello Thomas,
thanks for this hints. I encountered a related problem while using SIT on cFP realtime target. We would like to use parameters in simulink fuctions that are not tunable by default. For example, we would like to access the saturation parameters of an integrator block, or the P, I, and D Values of a PID controller.
Do you have any idea, how to make these non-tunable parameters visible as in/out ports in the modell dll in the SIT?
Thanks in advance,
Max
09-01-2008 01:56 PM
Max,
SIT 5.0 provides the feature to accomplish this goal.
Since this version it is possible to access workspace variables which is exactly what you need to change the saturation of an I block or the P, the I and the D value of the controller block on the fly.
Here is the link to the SIT 5.0 readme:
http://digital.ni.com/public.nsf/allkb/701DA092377322018625745D0081052D?OpenDocument
Thanks,
ThSa
09-10-2008 08:21 AM
Hello Thomas,
I now upgraded to LabView 8.6 and SIT 5.0. When using the SIT connection manager, the use of workspace variables works fine. However, the actual application runs a model dll on a cFP real time target and does not apply the SIT connection manager. I directly want to access the model in/outputs AND the model block parameters from the driver VI without using the SIT server. I would like to explain this with the sinewave example from the LabView library:
-By the use of a modified driver VI I can access the inputs and outputs of the Simulink sinewave model (modified array according to the portsReadme.txt)
-But the block parameters e.g. frequency or amplitude can not be accessed from the driver VI.
Is there any possibility to achieve this goal?
Thanks for your help, I also tried to contact the NI Support, but so far, no solution could be found.
Best regards,
Max
09-11-2008 04:58 PM
Max,
attached please find an example that shows, on the one hand, how to remote control a driver VI with a custom client VI and, on the other hand, how to set a parameter directly in the driver VI.
Depending on your needs you can use them individually. Unzip all files to the same folder, open and run the Client_Custom.vi. Additionally open the SineWave_Driver.vi (it should be already in run state) and notice that both VIs do have a button "set parameter" to set the amplitude and the frequency of the sine wave. The UI interface does provide a SIT Write Multiplve.vi whereas the SIT Set Model Parameter.vi needs to be called for each parameter individually.
The Client_Custom.vi is responsible to communicate with the driver VI via the SIT server.
The Sinewave_Driver.vi does have a modification on the block diagram that shows how to use the function SIT Set Model Parameter.vi.
Thanks,
ThSa