Matlab to Caspoc parameter export introduction.

NOTE!First save all files before running them!

In Matlab you can calculate parameters and use these parameters in a simulation example that you can start in Caspoc. Both exporting the parameters in a file and starting Caspoc can be done from the same m script. Important is that in the xml file the parameters are exported exactly as shown in the examples below, in Caspoc you have to specify the filename:name with a colon : in between!

Click to Close this View

Below is a simple example of simulation of a motor drive system, where the Power of the motor and the power factor of the motor are specified in a Matlab script and exported into a Caspoc simulation.

Click to Close this View

Inside Caspoc you can read parameters from the exported file when you specify MyFile:MyName instead of a numeric value in a block diagram block or in a library block. The filename MyFile is the filename of the exported xml file, the parameter name MyNname is specified within the tag <name>MyName</name>.

Below an example xml file is shown

In library blocks you can directly specify the filename:name combination to get he parameters. Belwo an example how to get the parameters Kabel01.L Kabel01.R Kabel01.X from the file intelec.xml