sweep mask parameter in a for loop -- block "MC3377xC Get Values" NXP Model-Based Design Toolbox

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

sweep mask parameter in a for loop -- block "MC3377xC Get Values" NXP Model-Based Design Toolbox

Jump to solution
1,091 Views
CZ_FB
Contributor I

Hello, 

I am using the block "MC3377xC Get Values" (and other blocks in the 'BMS_3377xC' library) from the NXP Model-Based Design Toolbox in Matlab Simulink 2023b.

I would like to know how to sweep the mask parameters (such as the 'Instance' and 'CID' values in the "MC3377xC Get Values" block) in a For Loop in Simulink simulation and for embedded code generation. 

Thanks

Cheng

0 Kudos
Reply
1 Solution
1,005 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @CZ_FB,

Unfortunately, this requirement is not possible right away, because it requires a serious update/patch coming from the MBDT team. We have to redesign and modify the blocks from the toolbox to accept both the CID and the Instance as a block input. I will open a ticket for such changes, but because we have no roadmap to cover a new release for the MBDT for S32K1, I cannot promise this will be implemented.

To faster help you with such requirements, I can identify 2 options:

1. You could use a switch case, and in each case place a block to handle the CID and Instance you need to cover.

2. The second option would be to create a block that uses custom code, after a template or method described in this article https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

How many BCCs do you need to cover?

Regards,

Marius

View solution in original post

1 Reply
1,006 Views
mariuslucianand
NXP Employee
NXP Employee

Hello @CZ_FB,

Unfortunately, this requirement is not possible right away, because it requires a serious update/patch coming from the MBDT team. We have to redesign and modify the blocks from the toolbox to accept both the CID and the Instance as a block input. I will open a ticket for such changes, but because we have no roadmap to cover a new release for the MBDT for S32K1, I cannot promise this will be implemented.

To faster help you with such requirements, I can identify 2 options:

1. You could use a switch case, and in each case place a block to handle the CID and Instance you need to cover.

2. The second option would be to create a block that uses custom code, after a template or method described in this article https://community.nxp.com/t5/NXP-Model-Based-Design-Tools/How-to-use-your-own-C-code-in-our-Toolbox-...

How many BCCs do you need to cover?

Regards,

Marius

%3CLINGO-SUB%20id%3D%22lingo-sub-1846469%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3Esweep%20mask%20parameter%20in%20a%20for%20loop%20--%20block%20%22MC3377xC%20Get%20Values%22%20NXP%20Model-Based%20Design%20Toolbox%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1846469%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%2C%26nbsp%3B%3C%2FP%3E%3CP%3EI%20am%20using%20the%20block%20%22MC3377xC%20Get%20Values%22%20(and%20other%20blocks%20in%20the%20'BMS_3377xC'%20library)%20from%20the%20NXP%20Model-Based%20Design%20Toolbox%20in%20Matlab%20Simulink%202023b.%3C%2FP%3E%3CP%3EI%20would%20like%20to%20know%20how%20to%20sweep%20the%20mask%20parameters%20(such%20as%20the%20'Instance'%20and%20'CID'%20values%20in%20the%20%22MC3377xC%20Get%20Values%22%20block)%20in%20a%20For%20Loop%20in%20Simulink%20simulation%20and%20for%20embedded%20code%20generation.%26nbsp%3B%3C%2FP%3E%3CP%3EThanks%3C%2FP%3E%3CP%3ECheng%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1866301%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20sweep%20mask%20parameter%20in%20a%20for%20loop%20--%20block%20%22MC3377xC%20Get%20Values%22%20NXP%20Model-Based%20Desi%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1866301%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHello%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F232188%22%20target%3D%22_blank%22%3E%40CZ_FB%3C%2FA%3E%2C%3C%2FP%3E%0A%3CP%3EUnfortunately%2C%20this%20requirement%20is%20not%20possible%20right%20away%2C%20because%20it%20requires%20a%20serious%20update%2Fpatch%20coming%20from%20the%20MBDT%20team.%20We%20have%20to%20redesign%20and%20modify%20the%20blocks%20from%20the%20toolbox%20to%20accept%20both%20the%20CID%20and%20the%20Instance%20as%20a%20block%20input.%20I%20will%20open%20a%20ticket%20for%20such%20changes%2C%20but%20because%20we%20have%20no%20roadmap%20to%20cover%20a%20new%20release%20for%20the%20MBDT%20for%20S32K1%2C%20I%20cannot%20promise%20this%20will%20be%20implemented.%3C%2FP%3E%0A%3CP%3ETo%20faster%20help%20you%20with%20such%20requirements%2C%20I%20can%20identify%202%20options%3A%3C%2FP%3E%0A%3CP%3E1.%20You%20could%20use%20a%20switch%20case%2C%20and%20in%20each%20case%20place%20a%20block%20to%20handle%20the%20CID%20and%20Instance%20you%20need%20to%20cover.%3C%2FP%3E%0A%3CP%3E2.%20The%20second%20option%20would%20be%20to%20create%20a%20block%20that%20uses%20custom%20code%2C%20after%20a%20template%20or%20method%20described%20in%20this%20article%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNXP-Model-Based-Design-Tools%2FHow-to-use-your-own-C-code-in-our-Toolbox-Battery-Management%2Fta-p%2F1119004%22%20target%3D%22_blank%22%3Ehttps%3A%2F%2Fcommunity.nxp.com%2Ft5%2FNXP-Model-Based-Design-Tools%2FHow-to-use-your-own-C-code-in-our-Toolbox-Battery-Management%2Fta-p%2F1119004%3C%2FA%3E%3C%2FP%3E%0A%3CP%3EHow%20many%20BCCs%20do%20you%20need%20to%20cover%3F%3C%2FP%3E%0A%3CP%3ERegards%2C%3C%2FP%3E%0A%3CP%3EMarius%3C%2FP%3E%3C%2FLINGO-BODY%3E