Poke WORD / DWORD

Top  Previous  Next

***

---

ATTENTION! If your projects do not have to be loaded by older TrySim versions (this is mainly the case in schools) please use the element that is just called ‘poke’. The elements which are called ‘poke word’ and ‘poke dword’ are still existing for a transitional period because of the compatibility. They will not appear in the element list in a later version. If projects still contain these elements then they will be transformed automatically in the new element while loading.

---

 

These are special elements that have no correspondence in reality, but are used to make TrySim more flexible.

 

With the help of a poke you can modify several properties of the elements by the PLC.

In the PLC program you give a word / double word and the value will be passed to the father of the poke element as if you enter it on the edit mask. Which field you want to poke is defined by the selection list ‘Field’.

 

The poke elements pass a value to their father if it (the value) has been changed by the PLC.

To program this in the PLC more easily you can click the check box ‘reset to poke to:’ and specify an appropriate reset value. After each transfer into the word / dword the poke will now be executed and the value of the word /dword will be set back to the reset value. You can select this value absolutely arbitrarily, but please note that it is outside the range in that you want to poke. If you choose this option it will be better to make sure that a value is only transferred in the word / dword if you really want to change the property of the element, because each transfer into the word / dword means a changing now, (apart from transferring the reset value, naturally). You must not use this option if the project is to be opened with TrySim versions below V2.9.10.

 

Please note that you must not alter the units of measuring (mm, cm, etc.) anymore while using pokes (or you have to adjust the poked value in the PLC program correspondingly).

 

The poked values are given nearly unchecked to the element. That means that the use of pokes needs an appropriate care, otherwise you will get unexpected results.

 

Most of the properties are expected as unsigned 16-bit-number (word-poke), not many (e.g., the hot spot of chains) are expected as unsigned 32-bit-number (Dword-Poke), so you have to select the element correspondingly. Click here to get a list of pokeable properties.

 

If you want to know for a special element whether some of its properties are poked just open its edit mask and click the symbol . Now you can see whether pokes are one of the children of this element.

 

The sample ‘formula1’ demonstrates the use of pokes.

 

See also:

Common properties

Static elements of simulation

 

Tabsheet: Misc.

 

Remark: The name of this element comes from a command of BASIC.