News:

  • August 15, 2026, 03:19:49 AM

Login with username, password and session length

Author Topic: Move Instruction not working  (Read 9683 times)

ksasikumar

  • Full Member
  • ***
  • Posts: 33
Move Instruction not working
« on: April 06, 2023, 05:45:59 PM »
Hello! I am using the MOVE instruction to move a constant value to an RY memory address. I am doing this in a few parts of the program for different memory addresses and noticed that the value in the destination is not changing in one of the rungs of the program. I'm not sure what could be causing this - the memory address is not used in other parts of the program. I have attached pictures of the rung that works and the one that doesn't. I also tried using COPY instead and it didn't work there either. The only option is to force the value.

rlp122

  • Sr. Member
  • ****
  • Posts: 92
Re: Move Instruction not working
« Reply #1 on: April 06, 2023, 07:21:23 PM »
Your PID is overwriting it.  If you want to write a manual value, you need to put the loop in manual.

ksasikumar

  • Full Member
  • ***
  • Posts: 33
Re: Move Instruction not working
« Reply #2 on: April 07, 2023, 09:22:46 AM »
The memory address in the MOVE instruction is not used in the PID instruction.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6170
  • Yes Pinky, Do-more will control the world!
Re: Move Instruction not working
« Reply #3 on: April 07, 2023, 12:32:53 PM »
The memory address in the MOVE instruction is not used in the PID instruction.

Check your cross reference. Something is likely writing to it somewhere.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

ksasikumar

  • Full Member
  • ***
  • Posts: 33
Re: Move Instruction not working
« Reply #4 on: April 11, 2023, 03:56:56 PM »
I double checked. I have it being used in another PID instruction, but that instruction is in manual mode. I have similar PID loops elsewhere in the program, but I'm only having an issue with this one memory address.

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 6170
  • Yes Pinky, Do-more will control the world!
Re: Move Instruction not working
« Reply #5 on: April 11, 2023, 04:17:08 PM »
I double checked. I have it being used in another PID instruction, but that instruction is in manual mode. I have similar PID loops elsewhere in the program, but I'm only having an issue with this one memory address.

If you want to send your project to Host's support email, we're happy to look over it. It would be very unlikely for a MOVE instruction to be failing, so there is likely something else going on.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

mhw

  • Hero Member
  • *****
  • Posts: 250
Re: Move Instruction not working
« Reply #6 on: April 12, 2023, 10:46:16 AM »
If you have enabled scaling for WY1 then the value in WY1 will automatically overwrite RY1.
Correct?

franji1

  • Bit Weenie
  • Host Moderator
  • Hero Member
  • *****
  • Posts: 3843
    • Host Engineering
Re: Move Instruction not working
« Reply #7 on: April 12, 2023, 12:26:02 PM »
If you have enabled scaling for WY1 then the value in WY1 will automatically overwrite RY1.
Correct?

The opposite - since WY/RY is an OUTPUT, you write to RY (engineering units) and the I/O Driver scales the RY value to the WY analog channel.  So you cannot write to WY directly - it will be overwritten by the scaling of RY back to raw units.

WX/RX (input) behaves as you described.  The value in WX1 will automatically overwrite the value in RX1, so writing to RX1 doesn't do anything.