Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Lego Mindstorms NXT

87 views
Skip to first unread message

Nikolaj

unread,
May 6, 2011, 3:05:20 PM5/6/11
to
I am student, and I am currently working towards a MSc in AI on NXT Lego Mindstorms.

I tried to install a simulation for NXT using Simulink. When I open TestMotorOSEK.mdl, or anyone other *.mdl file in samples directory, and click nxtbuild('TestMotor_app', 'build') then I get an error:

### Model failed to compile with strict bus check on
### Turning strict bus check off
??? Error in S-function 'TestMotorOSEK/ExpFcnCalls Scheduler': S-Function 'sfun_expfcncallsscheduler' does not exist.
Error executing callback 'ClickFcn'
Error using ==> rtwbuild at 190
Model has compile errors.

I use:
-Windows 7 x64
-Matlab R2009b
-ECRobot
-firmware 1.05 (tried with 1.28 and 1.29 too)
-Cygwin 2.738
-Fantom driver
. . .

Can anyone help me, please?

Gautam Vallabha

unread,
May 11, 2011, 11:06:04 AM5/11/11
to
"Nikolaj " <nikolas...@gmail.com> wrote in message <iq1gpf$htf$1...@newscl01ah.mathworks.com>...

> I tried to install a simulation for NXT using Simulink. When I open TestMotorOSEK.mdl, or anyone other *.mdl file in samples directory, and click nxtbuild('TestMotor_app', 'build') then I get an error:
>
> ### Model failed to compile with strict bus check on
> ### Turning strict bus check off
> ??? Error in S-function 'TestMotorOSEK/ExpFcnCalls Scheduler': S-Function 'sfun_expfcncallsscheduler' does not exist.
> Error executing callback 'ClickFcn'
> Error using ==> rtwbuild at 190
> Model has compile errors.
>
> I use:
> -Windows 7 x64
> -Matlab R2009b

ECRobot doesn't ship with the 64-bit mex files for the blocks, so Simulink errors out when you try to run or build a model. You have three options:

Option 1) If you have a supported C compiler installed on your 64-bit system, you can create the mex files yourself(http://www.mathworks.com/support/compilers/R2009b/win64.html ):
* In MATLAB, Go the to "ecrobotNXT\environment" folder
* Execute the following MATLAB code
files = dir('*.c');
for i=1:numel(files)
mex(files(i).name);
disp(files(i).name);
end
* You should now be able to run & build the ECRobot models

Option 2) Install 32-bit MATLAB on your 64-bit system, and then ECRobot should work with it. See the following link:
http://www.mathworks.com/support/solutions/en/data/1-579TVF/index.html?solution=1-579TVF
Make sure that you install 32-bit MATLAB in a folder that doesn&#8217;t have have any spaces in the path, i.e., don&#8217;t install in the default &#8220;c:\Program Files (x86)\&#8221;.

3) If you have a supported C compiler installed on your 64-bit system, you may also want to take a look at the Villanova University LEGO Real Time Target (VU-LRT):
http://www.mathworks.com/matlabcentral/fileexchange/29857
http://www.mathworks.com/academia/lego-mindstorms-nxt-software/legomindstorms-vulrt.html
VU-LRT also comes with the source code for the S-functions, so you can create the 64-bit mex files for all the blocks (see the included README.pdf).

Best,
Gautam

Nikolaj

unread,
May 13, 2011, 8:30:21 AM5/13/11
to
"Gautam Vallabha" <gautam.vall...@mathworks.com> wrote in message <iqe8ks$3tf$1...@newscl01ah.mathworks.com>...


Thank you so much!

Best regards,
Nikolaj

0 new messages