News:

  • October 01, 2025, 04:26:35 AM

Login with username, password and session length

Author Topic: double words.  (Read 2489 times)

PLCGuy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 677
double words.
« 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?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: double words.
« Reply #1 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)

Eckenrode

  • Newbie
  • *
  • Posts: 1
Re: double words.
« Reply #2 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 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?
« Last Edit: September 08, 2022, 10:25:10 AM by Eckenrode »

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3761
    • Host Engineering
Re: double words.
« Reply #3 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.