Setting P variables from D or B variable

  • Hi everyone,


    I want to set P variable using D variables in INFORM for my DX200 controller. I am changing D variables from my computer and would like to use them for changing P variable. Any help would be appreciated.


    TIA

    Gurtej Singh

  • Use the SETE instruction in ARITH. Depending on the format on the P variable the elements are 1 is S, 2 is L, 3 is U and so forth. If the P variable is XYZ, 1 is X, 2 is Y, 3 is Z and so forth.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • Oh wow thank you so much ..it worked really fine.!!

    Can we use this way for getting velocity from D variables also..?

    Use the SETE instruction in ARITH. Depending on the format on the P variable the elements are 1 is S, 2 is L, 3 is U and so forth. If the P variable is XYZ, 1 is X, 2 is Y, 3 is Z and so forth.

  • For velocities you can use an Integer or a Double.


    MOVJ VJ=D000

    MOVL V=D000


    You have to take decimals into account. On a VJ there are two decimal places. On a V= there is 1. On a V= the controller uses mm/sec regardless of what you are using.


    D000=1000


    This would be the equivalent of MOVJ VJ=10.00 or a MOVL V=100.0 mm/sec.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • Thank you for this info i will try it !!

    And last thing .. can we copy data from B variable to D variable using SET or is there some other things to be considered..?


    BR

  • Yes, you can use the SET to copy the content’s box of a Byte into the content’s box of a Double. If you need to do addition, subtraction, multiplication, or division you can also use the SET with the EXPRESS tag to reduce the number of instructions.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • You are simply trying to add an instruction and the cursor is not right above the END instruction. Press INSERT then ENTER.

    I know a thing or two, because I’ve seen a thing or two. Don't even ask about a third thing. I won't know it.

  • When you will add new instruction that aren't in the job content, press INSERT + ENTER.

    When there are instruction in the job content and you will change sections of it, after change press MODIFY + ENTER.

  • You are simply trying to add an instruction and the cursor is not right above the END instruction. Press INSERT then ENTER.

    When you will add new instruction that aren't in the job content, press INSERT + ENTER.

    When there are instruction in the job content and you will change sections of it, after change press MODIFY + ENTER.

    Thank you so much it worked perfectly fine this issue is resolved !!

  • any variable with an "L" is local to that job only and must be setup in the job header before you can use it.


    Any variable with "[ ]" is for array addressing.


    Variables without an "L" are global so any job can have access to them.

Advertising from our partners