Script Error

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Script Error

3,876 Views
Krish403
Contributor I

Hi,

I am using MIMX1024-EVK with FRDM-MC-LVPMSM board. I am trying to run the PMSM demo project. Communication between the PC and EVK is working but when I drag and drop the .pmp file from the MCUxpersso IDE v11.4.1 to Freemaster 3.1 I am receiving the below error message. Could you please help me with this error?

Thank you in advance.

Krish403_0-1633371863100.png

When I select Yes, below error message showing:

Krish403_1-1633372086616.png

 

 

0 Kudos
8 Replies

3,829 Views
joseftkadlec
NXP Employee
NXP Employee

Hi Krish403,

This error message is caused by an MCAT (motor control html+js script running in FreeMASTER). We are trying but can't reproduce your issue, trying various clicking in MCAT. Could you please describe the sequence how to reproduce the issue? Which buttons do you click in MCAT or does the message appear right after starting the FreeMASTER communication (gree GO button)?

Thank you for more information,

Josef

0 Kudos

3,814 Views
Krish403
Contributor I

Hi, thank you for the response. Somehow, I have resolved from the previous mentioned error. But now I am receiving new errors. I am following the below process to run the demo mc_pmsm SDK project.

  • I have downloaded MIMXRT1024 SDK.
  • Drag and dropped the SDK to the MCUexpresso IDE.
  • Imported SDK project from demp_apps_ mc_pmsm.
  • Automatically project added to the workspace as evkmimxrt1024_mc_pmsm.
  • Build and debug the project. And terminated IDE, to connect the freemaster.
  • Connected to the freemaster using connection wizard.
  • Drag and drop the .pmp file from the IDE (evkmimxrt1024_mc_pmsm> motor_control> freemaster> pmsm_float_enc.pmp)
  • Entered motor parameters, updated target, and generated configuration file.
  • App Control tab showing attached errors. I was unable to clear the fault. Unable to turn on Demo Mode On/Off. (Icon was disabled).
  •  Due to this, I was unable to run the motor.

Could you please help me with this issue?

Please let me know if you need more information.

Thank you very much.

0 Kudos

3,793 Views
joseftkadlec
NXP Employee
NXP Employee

Hi Krish,

I have several points:

  • It shouldn't be necessary to use the FreemASTER's connection wizard, just click the GO button.
  • If you are using the default Teknic motor (are you?) the application is already tuned and there is no need to enter parameters and update target.
  • If you want to tune the application for your own example, this is a more complicated process. Please follow the Chapter 9 in docs/MC/3PPMSMCRTUG.pdf
  • Regarding the fault: check the fault numberjoseftkadlec_0-1633694112489.png

     

     

  • After fault condition disappears, the application goes back to STOP state automatically and the fault number is captured for later debugging. 

Let me know your comments,

Thank you,

Josef

0 Kudos

3,787 Views
Krish403
Contributor I

Hi, thank you for the response.

I am using LINIX motor( part number: 45ZWN24-40). Assuming I can use the LINIX motor without  changing any motor parameters.

I have followed the process as you mentioned (GO button). After that window popped up.

Krish403_0-1633702504000.png

Here I have selected symbol file from the evkmimxrt1024_mc_pmsm_1 > Debug > evkmimxrt1024_mc_pmsm_1.axf.

File format: Binary ELF with DWARF2/DWARF4 dbg format.  Please correct me if I am wrong.

After this I am dragging the .pmp file to freemaster. Here is the fault number: 4

Krish403_1-1633704423362.png

Fault is not disappeared when I press CLEAR FAULT.

Please let me know your comments.

Thank you so much.

Krish403_2-1633704934438.png

 

 

0 Kudos

3,751 Views
Krish403
Contributor I

Hi,

I was able to spin the motor in scalar control mode. But I am unable to spin it in Speed FOC, Voltage and Current FOC modes. I am trying to find the solution.

Meanwhile, I have some questions, could you please help me?

  • If I change some motor parameters or values in the MCAT tool, do I need to rebuild the code?
  • Could you please describe briefly about update target, reload data and store data option functions?
  • Can I use MCUXpresso IDE debug and FreeMaster at the same time with single debug port?
  • How do I choose Expert mode in MCAT? I was unable to find it in my FreeMaster tool.

Thank you.

0 Kudos

3,734 Views
joseftkadlec
NXP Employee
NXP Employee

Hi Krish,

Comments to your previous issues:

  • DCbus overvoltage fault: I assume you have solved since you can spin in Scalar.
  • FreeMASTER map/elf/axf files: The example features TSA (Target Side Addressing) table so no map file is required and you should see variables' values even with blank Options -> MAP Files -> Default symbol file field. I can't reproduce such issue. Don't drag/drop *.pmp file. Just double-click it in the extracted_package/middleware/motor_control/freemaster/pmsm_float_enc.
    Regarding your questions:

Your questions:

  • You have to rebuild the code only if you change number of pole pair(Pp) or nominal speed (Nnom). Other parameters are changed immediately when you press Update target button.
  • Update target - updates constants from MCAT plugin to target MCU immediately. Good for tuning because you see the change immediately
  • When you change a white input filed in MCAT it gets red, indicating the change. Values of the MCAT input data are store in M1_params_pmsm_board.txt file
    • Store button - saves the MCAT input fields to the M1_param file so you can get back to your previous tuning next time
    • Reload button - reads and fills data from the M1_param file to MCAT
      The Store/Reload buttons don't affect data on target MCU
  • Debug+FreeMASTER at the same time: Usually, works simultaneously.
    Expert vs. Basic mode: this a residue in documentation. Please, ignore this. Now, there is no Basic mode, only Expert with all fields available.
    FOC tuning:

Tuning:

  • With Scalar functional, you are on good way to see the phase currents and Bemf observer performance
  • Anyway, you said you are using the default LINIX motor:
    At RT1024 encoder example the default application is tuned for the Teknic motor with encoder. Linix doesn't have encoder, that is why it is tuned for another motor.
  • The sensorless part of code is the same (timing, control loops etc.) so the fastest way to spin the LINIX motor is to take the tuning constants from another example (e.g. frdm_kv31):
    • Attached is m1_pmsm_appconfig.h file. Don't replace the entire file. Compare the constants and replace the changes (keep the original ENC and Position control constants) so you still have compileable code.
    • There is also M1_params_pmsm_frdm-kv31.txt. These are inputs which the m1_pmsm_appcofig.h file was generated from. Again compare and replace partially.
      Then try spinning and let me know your comments.

Good luck!

Thank you,

Josef

0 Kudos

3,631 Views
Krish403
Contributor I

Hello Josef,

Thank you so much for answering my questions.

Debug+FreeMASTER at the same time: For 1024EVK, I am using the J23 USB port for debugging and FreeMaster. But When I was trying to connect FreeMaster while using IDE it is showing the below error:

Krish403_0-1634604953162.png

Is there any demo code for BLDC motor with halls and encoder feedback for RT 1024 EVK? If so, where can I get the code?

Thanks a lot!

0 Kudos

3,850 Views
MichalH
NXP Apps Support
NXP Apps Support

Thank you for your report. I'm moving this topic to the Motor Control forum.

Regards,
Michal

0 Kudos