11-21-2008 04:13 AM
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
Solved! Go to Solution.
11-28-2008 05:15 AM
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.
12-01-2008 05:52 PM
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
12-02-2008 06:43 AM
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
12-02-2008 09:14 AM - edited 12-02-2008 09:19 AM
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
12-03-2008 08:51 AM
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
Ricki