adccommunitymod (AutomationDirect) asked a question.

Understanding Constants (K)

Created Date: July 08,2013

Created By: rssmith

**** This post has been imported from our legacy forum. Information in this post may be outdated and links contained in the post may no longer work.****

Sorry for the newbie questions, but I can't seem to find these answers elsewhere. In an exisiting program that I opened, there is an ANDE instruction, and in the first box is V10050 and in the second box is K60. Now after reading the Help guide, the ANDE instruction is simply comparing the two. I found out also K60 is a constant. Well, what I'm trying to figure out how to do is, how do you go about changing what the constant value is inside K60? I went to the Memory Editor but when I use the Find feature, it fails to find anything by name of K... :rolleyes:


  • adccommunitymod (AutomationDirect)

    Created Date: July 08,2013

    Created by: bcarlton

    You can only change a constant by changing the program itself and re-downloading. if you are online with a running program then it will pause execution for a period during download. The constant is fixed within the program and doesn't reside in any of the V memories. it is used when a value is to remain the same ( 'constant ').

  • adccommunitymod (AutomationDirect)

    Created Date: July 08,2013

    Created by: franji1

    Now after reading the Help guide, the ANDE instruction is simply comparing the two. I found out also K60 is a constant. Well, what I'm trying to figure out how to do is, how do you go about changing what the constant value is inside K60?

    I went to the Memory Editor but when I use the Find feature, it fails to find anything by name of K... :rolleyes: In most instructions, K50 and K60 are literally the BCD/Hexadecimal constants - they are NOT memory locations with constant values stored in them (ala TI 560/545). Hence, as Bernie stated, you must edit the program, change the instruction parameter from K60 to K50 (or whatever) and then download the program (possibly as a runtime edit).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: July 08,2013

    Created by: kewakl

    What franji1 is saying the constant value of K60 is 60.

    No way to change K60.

    If you want a different value, say 61, use K61.

  • adccommunitymod (AutomationDirect)

    Created Date: July 09,2013

    Created by: rssmith

    Okay, I think I understand. So the K just represents that it is a constant, and the number that follows is the actual constant "value ". So K70 means it's a constant number that is 70. :eek: :D

    Thanks!

  • adccommunitymod (AutomationDirect)

    Created Date: July 09,2013

    Created by: franji1

    Okay, I think I understand. So the K just represents that it is a constant, and the number that follows is the actual constant "value ". So K70 means it's a constant number that is 70. :eek: :D

    Thanks! Similarly, R represents Real constants (e.g. R3.14159 is approximately my favorite dessert). Similarly, O (oh) is for Octal contants, so O1400 is octal 1400 (although it is only available in one instruction LDA, useful when setting up pointers or specifying V addresses as parameters)

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: July 09,2013

    Created by: kasky

    But remember as mentioned above, K60 is a value of 60 in "BCD ".

  • adccommunitymod (AutomationDirect)

    Created Date: July 09,2013

    Created by: franji1

    But remember as mentioned above, K60 is a value of 60 in "BCD ".

    or Hexadecimal, based on the context, which is typically the instruction where you are using the K. For example, if you used it in an ADDB (Add Binary), K60 is NOT BCD, but the decimal equivalent of the hexadecimal K60, which is 96 decimal(aka binary).

    Expand Post
  • adccommunitymod (AutomationDirect)

    Created Date: July 09,2013

    Created by: kasky

    You bet ;)

  • adccommunitymod (AutomationDirect)

    Created Date: July 08,2013

    Created by: rssmith

    Sorry for the newbie questions, but I can't seem to find these answers elsewhere. In an exisiting program that I opened, there is an ANDE instruction, and in the first box is V10050 and in the second box is K60. Now after reading the Help guide, the ANDE instruction is simply comparing the two. I found out also K60 is a constant. Well, what I'm trying to figure out how to do is, how do you go about changing what the constant value is inside K60?

    I went to the Memory Editor but when I use the Find feature, it fails to find anything by name of K... :rolleyes:

    Expand Post