Operation manual: Difference between revisions
Jump to navigation
Jump to search
m (→Models) |
m (→Models) |
||
Line 48: | Line 48: | ||
'''PITONlib.mdl''' - contains library blocks. This model is not meant to be run as is, it is just a container for the blocks. | '''src/PITONlib.mdl''' - contains library blocks. This model is not meant to be run as is, it is just a container for the blocks. | ||
* vision | * vision | ||
* motor | * motor | ||
Line 54: | Line 54: | ||
'''PITONtmpl.mdl''' - a template to use as a starting point for custom experiments | '''src/PITONtmpl.mdl''' - a template to use as a starting point for custom experiments | ||
* uses the MTT target | * uses the MTT target | ||
* vision running at 25Hz | * vision running at 25Hz |
Revision as of 13:13, 26 October 2011
Back to: PITON steerable needle
All models and source code can be found in /home/PITON/.
Start Ubuntu
- Switch on the setup with the power button on the power socket
- Start the computer
- Choose the default Linux Kernel
- Log in as PITONuser with password PIT2011
Start MATLAB
- Open a terminal.
- Type sudo matlab with password PIT2011
Simulink models
Targets
Two different targets are used in the following models.
Generic Realtime Target (grt)
- Target is not Realtime, although its name suggests otherwise
- Cannot be used to control the ethercat stack
- All blocks within a scheme run at the same rate
- Can be used with external mode
Multi Threaded Target (mtt)
- Target is Realtime
- Can be used to control the ethercat stack
- Parts of the scheme can run at 1/n times the basic rate, n must be an integer
- Cannot be used with external mode
Models
fireCamCalibration/fireCamCalibrationModel.mdl - can be used to position the camera with respect to the needle and to determine appropriate settings.
- Run it with external mode to view the camera images.
- The red container marks the Region Of Interest (ROI).
- Position the camera and shape the ROI such that the all markers stay within the ROI during the experiments.
src/PITONlib.mdl - contains library blocks. This model is not meant to be run as is, it is just a container for the blocks.
- vision
- motor
- data storage
src/PITONtmpl.mdl - a template to use as a starting point for custom experiments
- uses the MTT target
- vision running at 25Hz
- motion running at 1000Hz
PITONexp1.mdl - an example experiment
Running an experiment
General directions
- Build the Simulink model using ctrl+b (only necessary when changes are made or when directed to do so by MATLAB). Ensure that the working directory of MATLAB is the directory containing the model.
- Ensure the motor enable power switch is switched on, it must be turned to the right
- Open a terminal
- In terminal: Enable super user privileges by typing sudo su and using password PIT2011
- In terminal: Navigate to the directory containing the Simulink model
- In terminal: Run ./modelname
Hold your hand stand by at the motor enable power switch to use it as an emergency switch if needed.
Grt specific
- When running ./modelname in a terminal, add -w to start simulation from Simulink.
- When running ./modelname in a terminal, add -tf inf to discard the simulation end time and run the simulation forever.
- When using external mode, ensure MATLAB's working directory is the directory containing the Simulink model