]> rtime.felk.cvut.cz Git - mf624-simulink.git/log
mf624-simulink.git
10 years agoUse correct header file for alloca for Linux build. master
Kvetoslav Belda [Fri, 18 Apr 2014 14:20:27 +0000 (16:20 +0200)]
Use correct header file for alloca for Linux build.

10 years agoAllow build of m624 AnalogInput by C89 compiler - i.e. MS Visual C.
Kvetoslav Belda [Fri, 18 Apr 2014 14:05:32 +0000 (16:05 +0200)]
Allow build of m624 AnalogInput by C89 compiler - i.e. MS Visual C.

10 years agoAdd build mode WITHOUT_HW to edit model without MF624 hardware access.
Pavel Pisa [Sat, 22 Feb 2014 13:03:39 +0000 (14:03 +0100)]
Add build mode WITHOUT_HW to edit model without MF624 hardware access.

Signed-off-by: Pavel Pisa <pi@baree.pikron.com>
10 years agoCorrect count of allocated integer work variables in sfPWMwDirOutput.
Pavel Pisa [Mon, 17 Feb 2014 08:46:28 +0000 (09:46 +0100)]
Correct count of allocated integer work variables in sfPWMwDirOutput.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoExample of use of PWM combined with digital direction output.
Pavel Pisa [Mon, 17 Feb 2014 08:31:14 +0000 (09:31 +0100)]
Example of use of PWM combined with digital direction output.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoInclude license header to prepare code for publication.
Pavel Pisa [Sun, 16 Feb 2014 18:56:16 +0000 (19:56 +0100)]
Include license header to prepare code for publication.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoNew sfPWMwDirOutput combining PWM with digital output bit for direction.
Pavel Pisa [Sun, 16 Feb 2014 18:29:17 +0000 (19:29 +0100)]
New sfPWMwDirOutput combining PWM with digital output bit for direction.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agomf624_blocks_demo adapt for IRC extension and include PWM blocks.
Pavel Pisa [Sat, 15 Feb 2014 16:51:41 +0000 (17:51 +0100)]
mf624_blocks_demo adapt for IRC extension and include PWM blocks.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoExtend IRC Input block to allow counter reset at startup.
Pavel Pisa [Sat, 15 Feb 2014 16:47:54 +0000 (17:47 +0100)]
Extend IRC Input block to allow counter reset at startup.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoImplemented basic PWM output block for MF624.
Pavel Pisa [Sat, 15 Feb 2014 16:11:31 +0000 (17:11 +0100)]
Implemented basic PWM output block for MF624.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoComplete list of MF624 counter registers and its fields.
Pavel Pisa [Sat, 15 Feb 2014 16:07:08 +0000 (17:07 +0100)]
Complete list of MF624 counter registers and its fields.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoAdd _reg suffix to MF624 counter subsystem registers.
Pavel Pisa [Sat, 15 Feb 2014 10:44:48 +0000 (11:44 +0100)]
Add _reg suffix to MF624 counter subsystem registers.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoMF624 demo including ADC, DAC, DIN, DOUT and IRC.
Pavel Pisa [Sat, 15 Feb 2014 10:31:52 +0000 (11:31 +0100)]
MF624 demo including ADC, DAC, DIN, DOUT and IRC.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoIRC inputs support implemented.
Pavel Pisa [Sat, 15 Feb 2014 08:28:18 +0000 (09:28 +0100)]
IRC inputs support implemented.

sfIRCInput block provides access to all MF624 IRC input
configurations and provides option to control reset
and gating modes by block input.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoDefine FIXED_IN_MINOR_STEP_OFFSET for external input blocks instead of 0.0 offset.
Pavel Pisa [Sat, 15 Feb 2014 02:38:54 +0000 (03:38 +0100)]
Define FIXED_IN_MINOR_STEP_OFFSET for external input blocks instead of 0.0 offset.

External inputs cannot be used for algebraic loops computations as
well as for derivatives computation. The value is considered sampled/stable
during time step.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoDigital input for MF624 implemented.
Pavel Pisa [Fri, 14 Feb 2014 21:22:20 +0000 (22:22 +0100)]
Digital input for MF624 implemented.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoChange uint to uint32_t in sfAnalogInput to allow its build for external mode.
Pavel Pisa [Fri, 14 Feb 2014 19:20:28 +0000 (20:20 +0100)]
Change uint to uint32_t in sfAnalogInput to allow its build for external mode.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoAdd definitions of MF624 IRC registers.
Pavel Pisa [Mon, 10 Feb 2014 19:51:54 +0000 (20:51 +0100)]
Add definitions of MF624 IRC registers.

Signed-off-by: Pavel Pisa <pisa@cmp.felk.cvut.cz>
10 years agoMinor change of HW-in-the-Loop model -
krecmich [Mon, 9 Dec 2013 14:00:20 +0000 (15:00 +0100)]
Minor change of HW-in-the-Loop model -
scope for currents connected after fault
simulation.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoThis commit just resolves issue with SIMULINK autosave.
krecmich [Wed, 4 Dec 2013 12:17:18 +0000 (13:17 +0100)]
This commit just resolves issue with SIMULINK autosave.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoUpdated HW-in-the-loop model with new parameters.
krecmich [Wed, 30 Oct 2013 13:32:09 +0000 (14:32 +0100)]
Updated HW-in-the-loop model with new parameters.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoRemove garbage
Michal Sojka [Wed, 11 Sep 2013 13:01:44 +0000 (15:01 +0200)]
Remove garbage

10 years agoUpdated HW-in-the-loop gitignore
krecmich [Wed, 11 Sep 2013 09:05:55 +0000 (11:05 +0200)]
Updated HW-in-the-loop gitignore

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoSetup the model to for external simulation
Michal Sojka [Tue, 23 Jul 2013 18:50:53 +0000 (20:50 +0200)]
Setup the model to for external simulation

The generated executable segfaults when started with -w (wait for connection).
It segfaults in external mode handling. Probably, I have some race condition in
the ERT target.

10 years agoWhitespace
Michal Sojka [Tue, 23 Jul 2013 18:07:08 +0000 (20:07 +0200)]
Whitespace

10 years agoImprove cleanup on termination (unmaps mappings and closes fd)
Michal Sojka [Tue, 23 Jul 2013 18:06:49 +0000 (20:06 +0200)]
Improve cleanup on termination (unmaps mappings and closes fd)

10 years agoDo not export unneeded functions + fix warning about implicit declaration of malloc()
Michal Sojka [Tue, 23 Jul 2013 17:42:28 +0000 (19:42 +0200)]
Do not export unneeded functions + fix warning about implicit declaration of malloc()

10 years agoImprove error/warning message
Michal Sojka [Tue, 23 Jul 2013 15:38:48 +0000 (17:38 +0200)]
Improve error/warning message

10 years agoConfigure for external mode
Michal Sojka [Tue, 23 Jul 2013 15:38:22 +0000 (17:38 +0200)]
Configure for external mode

10 years agoUpdate the model configuration to work with the updated ert_linux target
Michal Sojka [Tue, 23 Jul 2013 15:29:12 +0000 (17:29 +0200)]
Update the model configuration to work with the updated ert_linux target

10 years agomdlTerminate() is also called during code generation => do not report errors here
Michal Sojka [Tue, 23 Jul 2013 15:23:56 +0000 (17:23 +0200)]
mdlTerminate() is also called during code generation => do not report errors here

10 years agoDo not fail if mdlStart() cannot open /dev/uio0
Michal Sojka [Tue, 23 Jul 2013 14:13:21 +0000 (16:13 +0200)]
Do not fail if mdlStart() cannot open /dev/uio0

Such failing is inconvenient because mdlStart() is called even during
code generation [1]. If one tries to generate the code on a computer
without MF624 hardware, it fails.

This is solved that we ignore error in mdlStart(). When initialization
fails, we simply return from mdlStart() without reporing an error to the
user. The status of initialization is checked in every call to mdlOutputs()
and there the failres are already reported to the user.

[1] http://www.mathworks.com/matlabcentral/newsreader/view_thread/32986

10 years agoGenerate more meaningful error messages
Michal Sojka [Tue, 23 Jul 2013 13:43:18 +0000 (15:43 +0200)]
Generate more meaningful error messages

10 years agoRemove code duplication
Michal Sojka [Tue, 23 Jul 2013 13:34:39 +0000 (15:34 +0200)]
Remove code duplication

10 years agoSimplify device opening
Michal Sojka [Tue, 23 Jul 2013 13:26:34 +0000 (15:26 +0200)]
Simplify device opening

10 years agoDon't use -ansi mode for MEX compilations
Michal Sojka [Tue, 23 Jul 2013 12:39:59 +0000 (14:39 +0200)]
Don't use -ansi mode for MEX compilations

10 years agoAdd mexopts.sh
Michal Sojka [Tue, 23 Jul 2013 12:38:02 +0000 (14:38 +0200)]
Add mexopts.sh

10 years agoAdd mex makefile
Michal Sojka [Thu, 11 Jul 2013 11:26:30 +0000 (13:26 +0200)]
Add mex makefile

10 years agoFinal version of the model.
krecmich [Thu, 11 Jul 2013 09:36:59 +0000 (11:36 +0200)]
Final version of the model.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoRemoval of some testing models that were never meant
krecmich [Wed, 10 Jul 2013 13:01:39 +0000 (15:01 +0200)]
Removal of some testing models that were never meant
to be in the repository in the first place.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoFinal HW-in-the-loop model added.
krecmich [Wed, 10 Jul 2013 12:54:04 +0000 (14:54 +0200)]
Final HW-in-the-loop model added.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoChanged gate mode from low to high.
krecmich [Wed, 10 Jul 2013 12:53:09 +0000 (14:53 +0200)]
Changed gate mode from low to high.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoUpdated test model with new filename of mf624_SIMULINK.c.
krecmich [Thu, 4 Jul 2013 13:33:45 +0000 (15:33 +0200)]
Updated test model with new filename of mf624_SIMULINK.c.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoRemoved unused parameter from sfReadPWM.
krecmich [Thu, 4 Jul 2013 13:33:11 +0000 (15:33 +0200)]
Removed unused parameter from sfReadPWM.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoCorrected some minor errors in sfDigitalOutputs.c.
krecmich [Mon, 1 Jul 2013 13:46:38 +0000 (15:46 +0200)]
Corrected some minor errors in sfDigitalOutputs.c.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoMinor test model updates.
krecmich [Mon, 1 Jul 2013 12:48:56 +0000 (14:48 +0200)]
Minor test model updates.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoCreated s-functions for DigitalOutputs and for reading PWM via counters.
krecmich [Mon, 1 Jul 2013 12:48:43 +0000 (14:48 +0200)]
Created s-functions for DigitalOutputs and for reading PWM via counters.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoModified MF624 related s-functions to use single mf624_state structure
krecmich [Mon, 1 Jul 2013 12:48:01 +0000 (14:48 +0200)]
Modified MF624 related s-functions to use single mf624_state structure
declared in mf624_SIMULINK.c.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoMoved some defines from mf624_SIMULINK.c to dttomf624_SIMULINK.h
krecmich [Mon, 1 Jul 2013 12:46:42 +0000 (14:46 +0200)]
Moved some defines from mf624_SIMULINK.c to dttomf624_SIMULINK.h
to make them better accesible from s-functions.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoAdded gitignore for *.mexa64 and *.mat files.
krecmich [Fri, 28 Jun 2013 12:08:25 +0000 (14:08 +0200)]
Added gitignore for *.mexa64 and *.mat files.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoBlocks needed for control of mf624 I/O card via SIMULINK.
krecmich [Fri, 28 Jun 2013 12:05:59 +0000 (14:05 +0200)]
Blocks needed for control of mf624 I/O card via SIMULINK.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>
10 years agoFirst version of s-functions needed for opertaing mf624.
krecmich [Mon, 10 Jun 2013 10:21:12 +0000 (12:21 +0200)]
First version of s-functions needed for opertaing mf624.

Signed-off-by: krecmich <krecmich@emotor.felk.cvut.cz>