FreeMaster and Simulink FOC/BLDC/PMSM Communication

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

FreeMaster and Simulink FOC/BLDC/PMSM Communication

6,884 次查看
thomsonzhou
Contributor III

Does anybody know how to make freemaster communiate with simulink model?

I am working at a project, which needs freemaster work with Simulink models together.

Many thanks.

5 回复数

2,341 次查看
thomsonzhou
Contributor III

Hello, I come back again. 

   We now use ML128 MINI BOARD to drive FOC motor. Do you have any resources to makes  FOC motor rotate?

Does the mini board of ML128 can drive a single shunt resistor FOC motor?

Which PART in the FOC/BLDC simulink model or generated C code file  is the motor parameters we can input or adjust?

Because I need to change the max voltage and max current for my FOC motor.

Furthermore, How can I use ML128 internal oscillator but not the external oscillator on the ML128 MINI BOARD.

Do you have the demo code for switching external to internal?

Here I attached a source code below which choose external oscillator:

/*****************************************************************************
*
* Function: void initCPMU(void)
*
* Description: Clock, Reset and Power Management Unit configuration
*
*****************************************************************************/
void initCPMU(void)
{
// Wait for stable supply after power up
while (GDUF_GLVLSF)
{
GDUF_GLVLSF = 1;
}

CPMUREFDIV_REFDIV = CPMU_REFDIV;
CPMUREFDIV_REFFRQ = CPMU_REFFRQ;
CPMUSYNR_SYNDIV = CPMU_SYNDIV;
CPMUSYNR_VCOFRQ = CPMU_VCOFRQ;
CPMUPOSTDIV_POSTDIV = CPMU_POSTDIV;

while (CPMUIFLG_LOCK == 0)
{

}

CPMURFLG = 0x60; //Clear PORF and LVRF
}

Many thkanks.

2,341 次查看
thomsonzhou
Contributor III

how freemaster send speed request command to evl board? Just click stop sign button? I saw it is a connection command. 

Shoud I create my own command to start my motor? if yes, is there any pdf to show how to create cmd for motor start?

BTW, I want to test with simulink FOC modules with Freemaster connection without the evaluation board.

If it is Ok or not?

0 项奖励
回复

2,341 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi thomsonzhou‌,

The FreeMASTER has 2 compoments:

- the User Interface (UI) that sits on the Host PC

- the Embedded Communication Driver that is linked with the embedded application that runs on the MCU

The FreeMASTER UI is designed to establish a connection with the MCU once you click on the "Stop Sign Button"

In regards with your concern:

BTW, I want to test with simulink FOC modules with Freemaster connection without the evaluation board.

 If it is Ok or not?

The answer is NO, you can't test the FreeMASTER connection without having an evaluation board.

In regards with:

how freemaster send speed request command to evl board? Just click stop sign button? I saw it is a connection command. 

Shoud I create my own command to start my motor? if yes, is there any pdf to show how to create cmd for motor start?

The FreeMASTER is using HTML/JavaScript to implement functions that takes as inputs the values for the User Interface and write them into the target by modifying the RAM value for the variable assigned in the function. Please refer to chapter 6 in the document attached for examples.

Using the scripting you can implement your own User Interface panel with ActiveX objects to control anything you wish.

Hope this helps!

Daniel

0 项奖励
回复

2,341 次查看
thomsonzhou
Contributor III

hi Daniel,

    

    Would you mind please tell me which evaluation board you use for the foc motor  simluink module named S12ZVM_FOC_Sensorless.slx.

Currently, we have  ml128 mini board. according to the NXP official website, ml128 mini board can only run single shunt foc motor  or BLDC motor.

 

You said your simulink modules named both FOC and BLDC can run on your evaluation directly. Which board do you use? Or you use different board for

FOC and BLDC motor?

Wait for your reply.

0 项奖励
回复

2,341 次查看
Daniel_Popa
NXP Employee
NXP Employee

Hi thomsonzhou‌,

I'm not sure i understood your scenario. What exactly you wish to achieve?

Currently, the Simulink model contain the options to enable the FreeMASTER embedded driver support on the board. 

Once you have generated the code, the FreeMASTER driver is linked with your application if you can connect the FreeMASTER UI with the board via the selected communication channel to read/write data to the target.

Do you want a different scenario?

1: To have the Simulink dumpling simulation results to FreeMASTER instead of standard Simulink Blocks ?

2: To have the Simulink reading data from FreeMASTER during board run-time ?

Thank you!

Daniel

0 项奖励
回复