Object development - DataTagAccess as InternalElement

Hi all,

I try to develop a new object which should utilize the DataTagAccess as an "InternalElement". Building the object was no problem, but while testing TwinCat always gives me an exeption when using the read and write commands of the DataTagAccess.

I followed the "Press with 2 cylinders" example from the training and double checked everything. The exeption is thrown in the Extension OnCall method of the DataTagAccess object. I guess that some internal methods are not called correctly. Also the OutHmi struct of the Extension is not filled.

I used the code from an already testet subtree which works just fine. Just converting it to an object gives me problems.

Has anyone tried to build an object using internal elements and maybe got the same problem?

Thanks for any help.

Regards
Fabian

Best reply by StefanKayser

The reasons, why you get an exeption is, because you referenced the wrong library in your  library.
You Referenced the Library AtmoDataTagAccess but you need the Library NexeedDataTagAccess.

The HMI is not filled, because you referenced your chain to _outCmd and you give OutCmd to the HMI. These are 2 different variables.

2024-01-12_11h43_07.png
36.65KB
View original
7 replies
Resolved