TwinCAT 3: Pointer and References (Part 21)

For this video, we went into the natural habitat of pointers/pointers and references and observed them.

The result of these observations is that the pointer is a very powerful, but also slightly clumsy contemporary that you should rather keep an eye on. The reference, on the other hand, is very prudent and always plays it safe.

If you're wondering what we're talking about here, you'll understand once you watch the video.

We explain what a pointer is, share our observations with you and show you how to use it in TwinCAT. We provide examples for index access and pointer arithmetic. We answer the question how to subtract pointers and explain what the function F_CheckMemoryArea is and how you can use it.

Then we will have a look at the reference and show you how it can be used in TwinCAT.

You'll quickly notice the advantages and disadvantages of each. 🙂

Chapters

00:00 Intro
00:52 What is a POINTER
02:10 How do use pointers in TwinCAT 3
06:12 Index access
06:35 Example index access and pointer arithmetic
09:32 Substract Pointers
09:50 FUNCTION F_CheckMemoryArea: E_TcMemoryArea
13:12 What is a REFERENCE
14:34 How to use References in TwinCAT 3
18:42 Outro

← Part 20

Table of Contents