LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

SIT control gain/slider

Solved!
Go to solution

Hi there,

 

I'm trying to connect the gain from simulink so it can be controlled by LabView. The mappings works fine, but the the maximum and minimum value of my control in LabView always change to default. For example, in my case, I need the range value of -0.174 to 0.174 in my control. I can change it directly from the front panel or using the properties and it change perfectly. The problem comes when I switch my program to run, then the max/min value change back to the default (0-10) instead of -0.174 to 0.174.

 

I've tried to change my gain with the slider block in simulink and set the max/min over there, but the problem remains the same.

 

PS: Overall, the program works fine, it's just I'm being disturbed that I have to change the limit value everytime I start my program.

 

Any helps ?

 

Thx.

Ricki

0 Kudos
Message 1 of 6
(2,971 Views)

Hi Ricki,


Thanks for the post and I hope your well.

 

To ensure a control (indicator) has the desired properties (in this case) range. I would recommend using property nodes. Firstly, right click on the slider on the block diagram, create>>property node>>Scale>>Range>>Min/Max. You can the 'force' the value to your desired values. Using data flow and error clusters you can make these initialize steps happen at the start of the vi.

 

You should also be able to set the default but setting your range, then top toolbar>>edit>>Make Selected Values Default.

 

I hope this helps,

Kind Regards,
James.

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 6
(2,930 Views)
Solution
Accepted by topic author terwelu

Hello,

SIT can enable or disable the scaling of knobs and dials, but the behavior you see depends on which version of SIT you are using.  For SIT 5.0, check or uncheck the option in the SIT Connection Manager when mapping to the control.  For 4.0 there is an ini key you can use.  Please see the following help topics for more information:

 

SIT Connection Manager Dialog Box 5.0

Creating Mappings (Simulation Interface Toolkit) 4.0

 

I hope this helps,

Regards,

Angela M
Product Support Engineer

Message 3 of 6
(2,897 Views)

Hi James,

 

I've tried to do what your suggest, but the problem remain the same. All methods available in LabView to change the min/max value of my control was running perfectly. Even when I push the RUN button in the top menu, the problem seems solved, but whever I push RUN button in "Model Control" box (it's the control box of SIT Connection) then the problem comes up ! Any other clues ?

 

Angela,

 

I think I'm using SIT 5.0, but I can't find the "check or uncheck" option you mentioned. When I open SIT Connection Manager, I only have Model Host, Mapping and Data Logging, while File Playback and Hardware I/O were unable. In the Mapping dialog box, I didn't see any option rather then the mapping procedure itself. Could you be more specific? What kind of option should I looking at ?

 

James and Angela, I still need your help. Thx in advance !

 

Ricki

0 Kudos
Message 4 of 6
(2,882 Views)

Hello,

If you are using SIT 5.0, your Connection Manager should look something like the following image.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I have circled the autoscale option that is described in the help.

 

Is this what you are seeing?

Regards,

Angela M
Product Support Engineer

Message Edited by Angela M on 12-02-2008 09:19 AM
0 Kudos
Message 5 of 6
(2,869 Views)

Hi Angela,

 

First, it was my mistake. I thought I'm using SIT 5.0 instead it's still with SIT 4.0. However, the information you gave me by adding a line in labview.ini are very useful. It's works now !

Thx Smiley Wink

 

Ricki

Message 6 of 6
(2,839 Views)