Host Engineering Forum

General Category => General Discussion => Topic started by: PLCGuy on August 18, 2018, 02:45:30 PM

Title: double words.
Post by: PLCGuy on August 18, 2018, 02:45:30 PM
is COPY V2030:SD to V2040:SD with element number set to 1 legal, or do I set element number to 2?
Title: Re: double words.
Post by: franji1 on August 18, 2018, 03:04:54 PM
The range for COPY is "number of elements", hence, the element designated (as casted) is a "double word", so 1 is correct.

If you want to see for sure, try entering 2 for the range, and in the Ladder Display of the COPY instruction, you should see something like
Source: V2030:SD - V2032:SD (range of 2 DWORDs)
Destination: V2040:SD - V2042:SD (range of 2 DWORDs)
Title: Re: double words.
Post by: Eckenrode on August 28, 2018, 09:07:53 AM
The range for COPY is "number of elements", hence, the element designated (as casted) is a "double word", so 1 is correct.

If you want to see for sure, try best payday loans (https://www.wtkr.com/brand-spotlight/best-payday-loans/) and entering 2 for the range, and in the Ladder Display of the COPY instruction, you should see something like
Source: V2030:SD - V2032:SD (range of 2 DWORDs)
Destination: V2040:SD - V2042:SD (range of 2 DWORDs)

Hi Franji1, what would happen if you set the number to more than 1 btw?
Title: Re: double words.
Post by: franji1 on August 28, 2018, 10:19:59 AM
Hi Franji1, what would happen if you set the number to more than 1 btw?

If you want to see for sure, try entering 2 for the range, and in the Ladder Display of the COPY instruction, you should see something like
Source: V2030:SD - V2032:SD (range of 2 DWORDs) NOT 2 WORDS (because the element as casted is a DWORD)
Destination: V2040:SD - V2042:SD (range of 2 DWORDs) NOT 2 WORDS (because the element as casted is a DWORD)

See the attached example.  The COPY also has a row for a simple V copy of 2 V elements in addition to the cast row.