Welcome to the new Schneider Electric Community

It's your place to connect with experts and peers, get continuous support, and share knowledge.

  • Explore the new navigation for even easier access to your community.
  • Bookmark and use our new, easy-to-remember address (community.se.com).
  • Get ready for more content and an improved experience.

Contact SchneiderCommunity.Support@se.com if you have any questions.

Close
Invite a Co-worker
Send a co-worker an invite to the Exchange portal.Just enter their email address and we’ll connect them to register. After joining, they will belong to the same company.
Send Invite Cancel
84776members
354220posts

Strick pointers check

Machine Automation Forum

A forum addressing machine automation solutions for the complete machine lifecycle. Including offers like Machine Advisor, Modicon PLC/PacDrive, Lexium or Preventa. Discuss and share knowledge on offers relating to cloud-based service platforms, machine localization and monitoring, industrial operations control, motion products as well as safety function!

Solved
otrotabi
Lieutenant
Lieutenant
0 Likes
3
233

Strick pointers check

I forgot to correctly set some of the input types (CL00/01/02/03/04) in a TM171 so I implemented the SmartBaseGetAiType available in the SmartBios library.

 

AiCfg_usiType := SmartBaseGetAiType(0); works fine in a real target but hangs the simulator. I have seen a "simulate" variable being used in one of the TDVA projects, is that the suggested solution or there´s a better one ?

 

I also found out of misreading the instructions, that if I do set the "Strict pointers check" checkbox to TRUE I get this error in the CompCntrl_onOff function block which is part of the standard Application/Refrigeration library. That sound a little weird not knowing what this checkbox actually does. Can anyone comment on this ?

 

This is what I get:

 

COMPCNTRL_ONOFF(322) - error G0101: ADDRESS => Type mismatch in assignment
COMPCNTRL_ONOFF(331) - error G0101: ADDRESS => Type mismatch in assignment
COMPCNTRL_ONOFF(341) - error G0101: ADDRESS => Type mismatch in assignment
COMPCNTRL_ONOFF(342) - error G0101: ADDRESS => Type mismatch in assignment

0 warnings, 4 errors.


Accepted Solutions
FedericoM
Lieutenant Lieutenant
Lieutenant
0 Likes
1
211

Re: Strick pointers check

Hi,

 

SmartBios library can't be simulated because it is internally using pointers to memory addresses which are not simulated.

The easiest workaround is a variable/constant which allows to skip these functions when the application is executed on a simulator target.

 

"Strict pointers check" enabled increases the check done by the compiler which will raise an error if you play with pointers/variables of different types. I normally keep this disabled because sometimes it is necessary/useful to do it.

By the way, in this specific case, the compiler is raising a wrong error, it will be fixed in the next ESME HVAC release

See Answer In Context

Tags (2)
3 Replies 3
Bastian_Schmitz
Commander Commander
Commander
0 Likes
0
216

Re: Strick pointers check

If you enable this feature you must check the compability of data types by the use of pointers.

pointer.PNG

 

Normally this feature should be deactived in default.

Tags (1)
FedericoM
Lieutenant Lieutenant
Lieutenant
0 Likes
1
212

Re: Strick pointers check

Hi,

 

SmartBios library can't be simulated because it is internally using pointers to memory addresses which are not simulated.

The easiest workaround is a variable/constant which allows to skip these functions when the application is executed on a simulator target.

 

"Strict pointers check" enabled increases the check done by the compiler which will raise an error if you play with pointers/variables of different types. I normally keep this disabled because sometimes it is necessary/useful to do it.

By the way, in this specific case, the compiler is raising a wrong error, it will be fixed in the next ESME HVAC release

Tags (2)
otrotabi
Lieutenant
Lieutenant
0 Likes
0
204

Re: Strick pointers check

Thank you both for your comments.  I found the error quite strange because it is a well proven function block and the hours/starts counter work fine.

Tags (1)