MrPLC Member
  • Content count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About TPTsys

  • Rank
    Hi, I am New!

Profile Information

  • Country United States
  1. Codesys - Updating Unused Variables

    Yup!  That is how you do it. Another way to get values to show up is to just type the variable name somewhere in the code.   For example Input_1;   It will generate a warning  *This code doesn't do anything, is this intended?   or soemthing. but who cares about warnings, only errors will stop me!
  2. Twincat PLC - how declare variable

    Following up on derickloo's question about input mapping... I am used to being able to declare an input at a given memory address, then using a memcpy function to map a larger input area to get all of the inputs mapped at once.  For example: An input IO Block which has 392 bytes of process data: VAR_GLOBAL InputDataStart AT %I*: WORD; InputData:ARRAY[0..392] OF BYTE; END_VAR //Copy the block of memory with length 392 bytes starting with the InputDataStart to the InputData Array MEMCPY(destAddr:=ADR(GVL.InputData) , srcAddr:=ADR(GVL.InputDataStart) , n:=392 ); Or is the only way to individually painstakingly map each and every byte?