LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SIT for S Function

Hello,
 
I am newer for Labiew. I am trying importing simulink model with simulink interface tools V3.03 of Labview. It does work well! But I can not get the parameter of S function block in Simulink in SIT manager. Does SIT support the mapping parameter from S Function block in Simulink?
 
thanks so much
 
dennis from Munich
Message 1 of 6
(3,858 Views)
Dennis,

copy the following initoken into your LabVIEW.ini file and restart LabVIEW:
LVSITAllowDLLModel=TRUE


Now starting the SIT Conn Manager it is allowed to choose instead of the MDL file directly the DLL.
Independent on which target the simulation is running, simply choose the DLL instead of the MDL, switch to the 2nd tab "Mapping" and set the specific relations between controls and s-func parameters.
P1 and P2 are two independent parameters without information on the dimension. Depending on the way you (or someone other) have programmed the s-func knowledge on the dimension of the parameter is needed. Alternatively you might try scalar, 1D or 2D, ...




Changing s-func parameters during runtime, it is necessary to have tunable parameters. If you are not sure, you can test it in the original environment.

Thanks,
ThSa

Message Edited by ThSa on 08-29-2007 08:16 AM

Message 2 of 6
(3,810 Views)

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

0 Kudos
Message 3 of 6
(3,597 Views)

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

 

 

Message 4 of 6
(3,580 Views)

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

Message 5 of 6
(3,491 Views)

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

Message 6 of 6
(3,470 Views)