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!
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-19 08:48 AM
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.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-19 10:54 PM
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
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-19 10:41 PM . Last Modified: 2022-07-19 10:42 PM
If you enable this feature you must check the compability of data types by the use of pointers.
Normally this feature should be deactived in default.
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-19 10:54 PM
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
Link copied. Please paste this link to share this article on your social media post.
Link copied. Please paste this link to share this article on your social media post.
Posted: 2022-07-20 04:15 AM
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.
Link copied. Please paste this link to share this article on your social media post.
Create your free account or log in to subscribe to the board - and gain access to more than 10,000+ support articles along with insights from experts and peers.