Edit Field in AWE1WP01 file from KAREL + TPP

  • Use SET_VAR:

    Code
    SET_VAR (entry, 'AWE1WP03', 'SCH[2].$CMD_WFS', 5, STATUS)

    Thank You!!! This is code which work, now I need to make parsing parameter trough CALL.


    Edited 2 times, last by fmiroslav ().

  • For reading welding parameters from arguments you use:

    Code
    GET_TPE_PRM(arg_num, data_type, int_value, real_value, str_value, STATUS)

    Something like this, it's working but there is some another problem :(

    I would like to add (arg1) or insert (arg2) some value to string.

    For that purpose I want to convert Integer value to string (temp).

    Code
    CNV_INT_STR(arg1,1,1,temp)
    Code
    CNV_INT_STR(arg2,1,1,temp)

    and then to add and insert to string

    Code
    fname = 'AWE1WP0' + temp
    Code
    sch_num = 'SCH[' + temp + ']'
    sch_num_v = sch_num + '.$CMD_VOLTS'

    Trouble is temp is empty!




  • Third parameter was important, this code work for me


    Code
    CNV_INT_STR(arg2,1,0,temp_a2)
    temp_a2 = SUB_STR(temp_a2,2,1) 



    Not a piece of artwork but...


    TPP program

    Code
    CALL SET_FA_WPP(6,3,1,22,181,100,30,23,181,101,31,24,182,102,32,2,50)

    Description of parameters

  • fmiroslav

    Changed the title of the thread from “Edit Field in AWE1WP01 file from KAREL + TTP” to “Edit Field in AWE1WP01 file from KAREL + TPP”.
  • Here is some trouble with input for real values,

    almost every real number is passing ok to data file,

    value ****.0 is problem!


    If type 20.0 in TPP (parameter in procedure CALL) that value is suppressed to 20 and

    valued as Integer, as result in data file is passed 0.00000E+00!

    If type 20.01 in TPP that will be passed as 2.00100E+01 and in

    weld procedure window I get 20.0 (trimed from 20.01000.


    Any Idea? Converting to string or...?



    Code
    GET_TPE_PRM(7, data_type, arg_int, real_value, string_value, status)
    arg7 = real_value
    Code
    WRITE('arg 7', arg7, ' ')
    Code
    SET_VAR (entry, fname, sch_4, arg7, STATUS)



    New code

  • Solved in Real number value *.0 can't be passed trought procedure CALL as real just as integer

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now