Posts by fmiroslav
-
-
Hello
Welding cell with FANUC ARC Mate 120iC/10L with Lincoln Electric i400.
In SETUP Weld Proc is defined several Weld Process and in upper right corner is #number
for
Rapid Arc is # 87
CV is # 81
Pulse # 82
but when welding start this number isn't same
Rapid Arc # 0
CV # 2
Pulse #5
Does someone meaning of this # Number in Setup and Weld running mode?
-
-
-
-
Hello!
Q is, does somebody have full list of url parameters (part of STRING) for FORCE_LINK command?
I provide this code from net and my small list, please find welcome to contribute to this list!
Code
Display MorePROGRAM TRIPLE_SCRN %COMMENT = '*******' %NOABORT = ERROR + COMMAND %NOPAUSE = ERROR + COMMAND + TPENABLE %NOLOCKGROUP %NOBUSYLAMP VAR STATUS : INTEGER -------------------------------------------------------------------------- --- Main Program --- -------------------------------------------------------------------------- BEGIN FORCE_LINK(TP_PANEL,'config=triple'); -- Set to 3 screens -- If currently not triple screen layout, give it time to load. IF $UI_CONFIG.$MODE[1]<>6 THEN DELAY 300 ENDIF FORCE_LINK(TP_PANEL,'PRIM=MENUPAGE,71,1'); -- FORCE_LINK(TP2_PANEL,'DUAL=MENUPAGE,29,1'); -- FORCE_LINK(TP3_PANEL,'TRIPLE=MENUPAGE,97,1'); -- --FORCE_LINK(TP2_PANEL,'DUAL=MENUPAGE,33,1'); -- Current robot position screen --FORCE_LINK(TP3_PANEL,'TRIPLE=MENUPAGE,71,1'); -- Select program screen FORCE_LINK(TP_PANEL,'focus=prim'); -- Set focus to left screen END TRIPLE_SCRN
My small list
FORCE_LINK(pane_id:INTEGER, url:STRING)
list parameters for url
27,1 - UTILITIES Hints
28,1 - DATA Weld Procedure 1
29,1 - SYSTEM Clock
30,1 - STATUS Weld
33,1 - POSITION
34,1 - SYSTEM Variables
34,2 - DATA KAREL Vars
34,3 - DATA KAREL Posns
35,1 - SYSTEM Master/Cal
36,1 - I/O Weld In
37,1 - USER
64,1 - Select ?
66,1 - MANUAL OT Release
68,1 - SETUP General
69,1 - TEST CYCLE Setup
70,1 - STATUS Version ID
71,1 - Select
73,1 - FILE
95,1 I/O Weld In
97,1 - I/O Analog Out
98,1 - I/O Digital Out
99,1 - I/O Group Out
-
On robot base you will find 1-6 axis pulscoder battery , on the robot controller door will find 7, 8 axis pulscoder battery.
-
Hello
I am trying to use your program to create mine, but I don't understund why you need to do this for mastering
When I unmark these lines, I got this error message:
THSR-025 Nested search start
Could you/someone help please?
Thank you
Hi MoEL,
try to Mastering Part with Remarked line
if You fail at that, then please follow this steps
When You Mastering Part, remove Remark from line 14 and 23, when run program back Remark.
At line 15 and 24 get Error THSR-025 Nested search start, step up for one line (to line 14 and 23)
press RESET to remove error message, press SHIFT + FWD keep SHIFT pressed.
Program will be executed search and retract.
At line 29 Error THSR-013 Illegal number of search, Just ignore because You CAN, RES
Why is it so, that is question for Fanuc. I try school examples from manual.... maybe is some problem in configuration of robot? I would like if You succeed with // Marked lines.
-
-
Hi,
in this moment I can't weld but I can activate Piece search and on wire I get voltage, this voltage is 49,1 VDC. DI from Ethernet/IP card are static no changes when turn off or turn on Piece search.
By my humble opinion if AI/AO are defined any definition of DI/DO is excessive and useless.
I await some answer from Abicor Binzel about this.
So, I try some combination,
Mapping 79.55 LSB, MSB
0/1000, 0/100
Piece search OFF / ON
1.0 / 0.9
0/50, 0/50
Piece search OFF / ON
10.0 / 9.4
50/0, 0/50
Piece search OFF / ON
40.0 / 40.6
500/0, 0/50
Piece search OFF / ON
49.0 / 49.1
Mapping 79.52 MSB, LSB
0/50, 0/50
Piece search OFF / ON
10.0 / 12.5
50/0, 0/50
Piece search OFF / ON
40.0 / 37.5
0/10, 0/50
Piece search OFF / ON
50.0 / 62.5
I need to seat and find why I getting this values.
When I read out 0.0 and 49.1 that will be OK.
-
Don't know the setup for welding, but:
on the diagramm the value of the analog input is given in Volt, think you won't get 65565 Volt from the welder. Either you have a digital interface to the welder or an analog, if you have an analog you probably will get 0-10Volt, or maybe 20mA. If you have a digital you will get the value of 65565.
Signal from Welding Machine is over EthernetIP from Abicor Binzel Robot Interface iROB-RI3000 card.
At Welding Machine 2 x AI - programmed 2 x AI not programmed and 10 x AO, 0 - 65535 (2 Byte).
In this moment I have from DI169-DI184 (2 Byte), 00000000 10010010, DEC 18688,
WMAO 2. Welding Voltage, in stand by here is ~ 14,26 V as feedback.
-
Hello
When I try to change value for Analog signal range - Input Max value, I get Invalid real (0.000,9999.000)
I try to define 65535 as Input Max value - It's maximum from analog input from welding machine, defined by 2 Byte, 0 - 65535.
Similar robot cell, where Group signal is defined, there Input Max value is 32767, if I try to change this value to bigger or even same
there is error occurred (like on pic 3.)
So solution is config file for I/O, but does anybody receipt and order for steps how to apply settings?
-
Megatronic already has such files and transfers them for integration
Can You send to me weqcfg1.xml for Migatronic weld machine?
Thanks
-
Hello,
I am an intern and I'm just getting started with the welding robot. We have a Fanuc ARC Mate 0iB robot. I was able to figure out basic programming to weld parts. However, to weld similar parts we have to constantly reprogram it and do touch ups considering the tolerances. We are trying to weld a simple T joint. IT would be really helpful if anyone would be willing to tell how touch sensing and through arc seam tracking is to be programmed for a simple T joint (picture attached).
Thank you very much in advance.
Solved?
-
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...?
New code
Code
Display MorePROGRAM SET_FA_WPP TYPE AW_PLS_SCH_T = STRUCTURE PULSE_ENB : BOOLEAN PULSE_FREQ : REAL PULSE_DUTY : REAL PHASE_SFT : INTEGER ENDSTRUCTURE VAR SCH : ARRAY[7] OF AW_SCH_T VAR LSCH : ARRAY[3] OF AW_SCH_T VAR RSCH : ARRAY[3] OF AW_SCH_T VAR PLSCH : ARRAY[3] OF AW_PLS_SCH_T VAR AWWV_MODE : ARRAY[3] OF INTEGER VAR entry, STATUS : INTEGER VAR arg1, arg2, arg3 : INTEGER VAR arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17 : REAL VAR temp, fname : STRING [25] VAR temp_a1, temp_a2, temp_a3, temp_a4, temp_a5, temp_a6, temp_a7, temp_a8, temp_a9, temp_a10, temp_a11, temp_a12, temp_a13, temp_a14, temp_a15, temp_a16, temp_a17 : STRING[17] --VAR sch_num : STRING[25] VAR awwv : STRING[25] VAR sch_1, sch_2, sch_3, sch_4 : STRING[25] VAR lsch_1, lsch_2, lsch_3, lsch_4 : STRING[25] VAR rsch_1, rsch_2, rsch_3, rsch_4 : STRING[25] VAR plsch_1, plsch_2 : STRING[25] VAR data_type : INTEGER VAR real_value : REAL VAR string_value : STRING[17] VAR arg_int : INTEGER VAR arg_real : REAL BEGIN -- get integer value GET_TPE_PRM(1, data_type, arg_int, real_value, string_value, status) arg1 = arg_int GET_TPE_PRM(2, data_type, arg_int, real_value, string_value, status) arg2 = arg_int GET_TPE_PRM(3, data_type, arg_int, real_value, string_value, status) arg3 = arg_int -- get real value GET_TPE_PRM(4, data_type, arg_int, real_value, string_value, status) arg4 = real_value GET_TPE_PRM(5, data_type, arg_int, real_value, string_value, status) arg5 = real_value GET_TPE_PRM(6, data_type, arg_int, real_value, string_value, status) arg6 = real_value GET_TPE_PRM(7, data_type, arg_int, real_value, string_value, status) arg7 = real_value GET_TPE_PRM(8, data_type, arg_int, real_value, string_value, status) arg8 = real_value GET_TPE_PRM(9, data_type, arg_int, real_value, string_value, status) arg9 = real_value GET_TPE_PRM(10, data_type, arg_int, real_value, string_value, status) arg10 = real_value GET_TPE_PRM(11, data_type, arg_int, real_value, string_value, status) arg11 = real_value GET_TPE_PRM(12, data_type, arg_int, real_value, string_value, status) arg12 = real_value GET_TPE_PRM(13, data_type, arg_int, real_value, string_value, status) arg13 = real_value GET_TPE_PRM(14, data_type, arg_int, real_value, string_value, status) arg14 = real_value GET_TPE_PRM(15, data_type, arg_int, real_value, string_value, status) arg15 = real_value GET_TPE_PRM(16, data_type, arg_int, real_value, string_value, status) arg16 = real_value GET_TPE_PRM(17, data_type, arg_int, real_value, string_value, status) arg17 = real_value -- clear user screen -- WRITE (CHR(128),CHR(137)) -- for debuging - write arguments to user window -- -- WRITE('arg 1', arg1, ' ') -- WRITE('arg 2', arg2, ' ') -- WRITE('arg 3', arg3, CR) -- WRITE('arg 4', arg4, CR) -- WRITE('arg 5', arg5, ' ') -- WRITE('arg 6', arg6, CR) WRITE('arg 7', arg7, ' ') -- WRITE('arg 8', arg8, CR) -- WRITE('arg 9', arg9, ' ') -- WRITE('arg 10', arg10, CR) -- WRITE('arg 11', arg11, CR) -- WRITE('arg 12', arg12, CR) -- WRITE('arg 13', arg13, ' ') -- WRITE('arg 14', arg14, CR) -- WRITE('arg 15', arg15, CR) -- WRITE('arg 16', arg16, CR) -- WRITE('arg 17', arg17, CR) CNV_INT_STR(arg1,1,0,temp_a1) WRITE('temp', temp_a1, CR) temp_a1 = SUB_STR(temp_a1,2,1) -- WRITE('temp', temp_a1, CR) fname = 'AWE1WP0' + temp_a1 -- WRITE('fname ', fname, CR) -- -- *** temp_a2 = '' -- -- *** temp_a2 = SUB_STR(temp_a2,2,1) awwv = 'AWWV_MODE[' + temp_a2 + ']' awwv = 'AWWV_MODE[1]' -- -- WRITE('awwv ', awwv, CR) -- -- WRITE('awwv ', temp_a2, CR) CNV_INT_STR(arg3,1,0,temp_a3) temp_a3 = SUB_STR(temp_a3,2,1) CNV_INT_STR(arg2,1,0,temp_a2) temp_a2 = SUB_STR(temp_a2,2,1) awwv = 'AWWV_MODE[' + temp_a2 + ']' sch_1 = 'SCH[' + temp_a2 + ']' sch_1 = sch_1 + '.$CMD_VOLTS' -- WRITE('sch_1 ', sch_1, CR) sch_2 = 'SCH[' + temp_a2 + ']' sch_2 = sch_2 + '.$CMD_WFS' -- WRITE('sch_2 ', sch_2, CR) sch_3 = 'SCH[' + temp_a2 + ']' sch_3 = sch_3 + '.$CMD_AMPS' -- WRITE('sch_3 ', sch_3, CR) sch_4 = 'SCH[' + temp_a2 + ']' sch_4 = sch_4 + '.$CMD_WSPEED' -- WRITE('sch_4 ', sch_4, CR) lsch_1 = 'LSCH[' + temp_a2 + ']' lsch_1 = lsch_1 + '.$CMD_VOLTS' -- WRITE('lsch_1 ', lsch_1, CR) lsch_2 = 'LSCH[' + temp_a2 + ']' lsch_2 = lsch_2 + '.$CMD_WFS' -- WRITE('lsch_2 ', lsch_2, CR) lsch_3 = 'LSCH[' + temp_a2 + ']' lsch_3 = lsch_3 + '.$CMD_AMPS' -- WRITE('lsch_3 ', lsch_3, CR) lsch_4 = 'LSCH[' + temp_a2 + ']' lsch_4 = lsch_4 + '.$CMD_WSPEED' -- WRITE('lsch_4 ', sch_4, CR) rsch_1 = 'RSCH[' + temp_a2 + ']' rsch_1 = rsch_1 + '.$CMD_VOLTS' -- WRITE('rsch_1 ', rsch_1, CR) rsch_2 = 'RSCH[' + temp_a2 + ']' rsch_2 = rsch_2 + '.$CMD_WFS' -- WRITE('rsch_2 ', rsch_2, CR) rsch_3 = 'RSCH[' + temp_a2 + ']' rsch_3 = rsch_3 + '.$CMD_AMPS' -- WRITE('rsch_3 ', rsch_3, CR) rsch_4 = 'RSCH[' + temp_a2 + ']' rsch_4 = rsch_4 + '.$CMD_WSPEED' -- WRITE('rsch_4 ', rsch_4, CR) plsch_1 = 'PLSCH[' + temp_a2 + ']' plsch_1 = plsch_1 + '.$PULSE_FREQ' -- WRITE('plsch_1 ', plsch_1, CR) plsch_2 = 'PLSCH[' + temp_a2 + ']' plsch_2 = plsch_2 + '.$PULSE_DUTY' -- WRITE('plsch_2 ', plsch_2, CR) SET_VAR (entry, fname, awwv, arg3, STATUS) SET_VAR (entry, fname, sch_1, arg4, STATUS) SET_VAR (entry, fname, sch_2, arg5, STATUS) SET_VAR (entry, fname, sch_3, arg6, STATUS) SET_VAR (entry, fname, sch_4, arg7, STATUS) SET_VAR (entry, fname, lsch_1, arg8, STATUS) SET_VAR (entry, fname, lsch_2, arg9, STATUS) SET_VAR (entry, fname, lsch_3, arg10, STATUS) SET_VAR (entry, fname, lsch_4, arg11, STATUS) SET_VAR (entry, fname, rsch_1, arg12, STATUS) SET_VAR (entry, fname, rsch_2, arg13, STATUS) SET_VAR (entry, fname, rsch_3, arg14, STATUS) SET_VAR (entry, fname, rsch_4, arg15, STATUS) SET_VAR (entry, fname, plsch_1, arg16, STATUS) SET_VAR (entry, fname, plsch_2, arg17, STATUS) END SET_FA_WPP
Solved in Real number value *.0 can't be passed trought procedure CALL as real just as integer
-
I add this VARiable
CodeVAR arg4_str, arg5_str, arg6_str, arg7_str, arg8_str, arg9_str, arg10_str, arg11_str, arg12_str, arg13_str, arg14_str, arg15_str, arg16_str, arg17_str : STRING[25] VAR arg4_int, arg5_int, arg6_int, arg7_int, arg8_int, arg9_int, arg10_int, arg11_int, arg12_int, arg13_int, arg14_int, arg15_int, arg16_int, arg17_int : INTEGER
And in Nation Code add few line
converting to string, adding '.00' and final converting to real.
Code
Display MoreGET_TPE_PRM(11, data_type, arg_int, real_value, string_value, status) arg11 = real_value --Validate what was passed. IF (data_type=1) AND (STATUS=0) THEN --Argument is an int. arg11_int =arg_int --you can cast ints to reals without conversion CNV_INT_STR(arg11_int,25,0,arg11_str) arg11_str = arg11_str + '.00' CNV_STR_REAL(arg11_str,arg11) ENDIF IF (data_type=2) AND (STATUS=0) THEN --Argument is a real. arg11 = real_value ELSE --Argument is a string, or the status failed --Error code here. ENDIF
Now input work with any real number (include *.0 which is on input converted by fanuc to INT value)
-
You need to look at the data_type parameter in your TPE command, and make a decision based on what it gives you. It tells you what type of data (real or int) that is coming in.
In TP I have CALL for KAREL program
parameters from 4 to 17 are REAL input expected, and work with any real number
except real number which end with .0 or .00 or .000 etc. this numbers will be
suppressed to integer number without .0 or .00
-
I find this thread
KAREL - SQRT issue (real, integer)
but I can't predict inputs, maybe user want to input 20.0 or 20.00 but not 20.0000001
-
Is a bug?
When trying to pass real number E.g 20.0 in procedure CALL that will be suppressed to 20,
because in procedure is expected real value that VAR will be set to 0.00000E+00
Any idea how to deal with real number *.0 / *.00 etc.?
TPP program
CodeCALL SET_FA_WPP(6,1,1,22.5,181.1,100,20,23,181,101,31,24,182,102,32,2,50) ; CALL SET_FA_WPP(6,2,2,23,182,100,31,23,181,101,31,24,182,102,32,2,50) ; CALL SET_FA_WPP(6,3,4,24.3,184.6,100.9,32.3,23.1,181.7,101.3,31.5,24.8,182.8,102.7,32.8,2.9,50.5) ;
KAREL program
Code
Display MorePROGRAM SET_FA_WPP TYPE AW_PLS_SCH_T = STRUCTURE PULSE_ENB : BOOLEAN PULSE_FREQ : REAL PULSE_DUTY : REAL PHASE_SFT : INTEGER ENDSTRUCTURE VAR SCH : ARRAY[7] OF AW_SCH_T VAR LSCH : ARRAY[3] OF AW_SCH_T VAR RSCH : ARRAY[3] OF AW_SCH_T VAR PLSCH : ARRAY[3] OF AW_PLS_SCH_T VAR AWWV_MODE : ARRAY[3] OF INTEGER VAR entry, STATUS : INTEGER VAR arg1, arg2, arg3 : INTEGER VAR arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17 : REAL VAR temp, fname : STRING [25] VAR temp_a1, temp_a2, temp_a3, temp_a4, temp_a5, temp_a6, temp_a7, temp_a8, temp_a9, temp_a10, temp_a11, temp_a12, temp_a13, temp_a14, temp_a15, temp_a16, temp_a17 : STRING[17] --VAR sch_num : STRING[25] VAR awwv : STRING[25] VAR sch_1, sch_2, sch_3, sch_4 : STRING[25] VAR lsch_1, lsch_2, lsch_3, lsch_4 : STRING[25] VAR rsch_1, rsch_2, rsch_3, rsch_4 : STRING[25] VAR plsch_1, plsch_2 : STRING[25] VAR str_7 : STRING[17] VAR data_type : INTEGER VAR real_value : REAL VAR string_value : STRING[17] VAR arg_int : INTEGER VAR arg_real : REAL BEGIN -- get integer value GET_TPE_PRM(1, data_type, arg_int, real_value, string_value, status) arg1 = arg_int GET_TPE_PRM(2, data_type, arg_int, real_value, string_value, status) arg2 = arg_int GET_TPE_PRM(3, data_type, arg_int, real_value, string_value, status) arg3 = arg_int -- get real value GET_TPE_PRM(4, data_type, arg_int, real_value, string_value, status) arg4 = real_value GET_TPE_PRM(5, data_type, arg_int, real_value, string_value, status) arg5 = real_value GET_TPE_PRM(6, data_type, arg_int, real_value, string_value, status) arg6 = real_value GET_TPE_PRM(7, data_type, arg_int, real_value, string_value, status) arg7 = real_value GET_TPE_PRM(8, data_type, arg_int, real_value, string_value, status) arg8 = real_value GET_TPE_PRM(9, data_type, arg_int, real_value, string_value, status) arg9 = real_value GET_TPE_PRM(10, data_type, arg_int, real_value, string_value, status) arg10 = real_value GET_TPE_PRM(11, data_type, arg_int, real_value, string_value, status) arg11 = real_value GET_TPE_PRM(12, data_type, arg_int, real_value, string_value, status) arg12 = real_value GET_TPE_PRM(13, data_type, arg_int, real_value, string_value, status) arg13 = real_value GET_TPE_PRM(14, data_type, arg_int, real_value, string_value, status) arg14 = real_value GET_TPE_PRM(15, data_type, arg_int, real_value, string_value, status) arg15 = real_value GET_TPE_PRM(16, data_type, arg_int, real_value, string_value, status) arg16 = real_value GET_TPE_PRM(17, data_type, arg_int, real_value, string_value, status) arg17 = real_value -- clear user screen -- WRITE (CHR(128),CHR(137)) -- for debuging - write arguments to user window -- -- WRITE('arg 1', arg1, ' ') -- WRITE('arg 2', arg2, ' ') -- WRITE('arg 3', arg3, CR) -- WRITE('arg 4', arg4, CR) -- WRITE('arg 5', arg5, ' ') -- WRITE('arg 6', arg6, CR) WRITE('arg 7', arg7, ' ') -- WRITE('arg 8', arg8, CR) -- WRITE('arg 9', arg9, ' ') -- WRITE('arg 10', arg10, CR) -- WRITE('arg 11', arg11, CR) -- WRITE('arg 12', arg12, CR) -- WRITE('arg 13', arg13, ' ') -- WRITE('arg 14', arg14, CR) -- WRITE('arg 15', arg15, CR) -- WRITE('arg 16', arg16, CR) -- WRITE('arg 17', arg17, CR) CNV_INT_STR(arg1,1,0,temp_a1) WRITE('temp', temp_a1, CR) temp_a1 = SUB_STR(temp_a1,2,1) -- WRITE('temp', temp_a1, CR) fname = 'AWE1WP0' + temp_a1 -- WRITE('fname ', fname, CR) -- -- *** temp_a2 = '' -- -- *** temp_a2 = SUB_STR(temp_a2,2,1) awwv = 'AWWV_MODE[' + temp_a2 + ']' awwv = 'AWWV_MODE[1]' -- -- WRITE('awwv ', awwv, CR) -- -- WRITE('awwv ', temp_a2, CR) CNV_INT_STR(arg3,1,0,temp_a3) temp_a3 = SUB_STR(temp_a3,2,1) CNV_INT_STR(arg2,1,0,temp_a2) temp_a2 = SUB_STR(temp_a2,2,1) awwv = 'AWWV_MODE[' + temp_a2 + ']' sch_1 = 'SCH[' + temp_a2 + ']' sch_1 = sch_1 + '.$CMD_VOLTS' -- WRITE('sch_1 ', sch_1, CR) sch_2 = 'SCH[' + temp_a2 + ']' sch_2 = sch_2 + '.$CMD_WFS' -- WRITE('sch_2 ', sch_2, CR) sch_3 = 'SCH[' + temp_a2 + ']' sch_3 = sch_3 + '.$CMD_AMPS' -- WRITE('sch_3 ', sch_3, CR) CNV_REAL_STR(arg7, 2, 1, str_7) sch_4 = 'SCH[' + temp_a2 + ']' sch_4 = sch_4 + '.$CMD_WSPEED' -- WRITE('sch_4 ', sch_4, CR) lsch_1 = 'LSCH[' + temp_a2 + ']' lsch_1 = lsch_1 + '.$CMD_VOLTS' -- WRITE('lsch_1 ', lsch_1, CR) lsch_2 = 'LSCH[' + temp_a2 + ']' lsch_2 = lsch_2 + '.$CMD_WFS' -- WRITE('lsch_2 ', lsch_2, CR) lsch_3 = 'LSCH[' + temp_a2 + ']' lsch_3 = lsch_3 + '.$CMD_AMPS' -- WRITE('lsch_3 ', lsch_3, CR) lsch_4 = 'LSCH[' + temp_a2 + ']' lsch_4 = lsch_4 + '.$CMD_WSPEED' -- WRITE('lsch_4 ', sch_4, CR) rsch_1 = 'RSCH[' + temp_a2 + ']' rsch_1 = rsch_1 + '.$CMD_VOLTS' -- WRITE('rsch_1 ', rsch_1, CR) rsch_2 = 'RSCH[' + temp_a2 + ']' rsch_2 = rsch_2 + '.$CMD_WFS' -- WRITE('rsch_2 ', rsch_2, CR) rsch_3 = 'RSCH[' + temp_a2 + ']' rsch_3 = rsch_3 + '.$CMD_AMPS' -- WRITE('rsch_3 ', rsch_3, CR) rsch_4 = 'RSCH[' + temp_a2 + ']' rsch_4 = rsch_4 + '.$CMD_WSPEED' -- WRITE('rsch_4 ', rsch_4, CR) plsch_1 = 'PLSCH[' + temp_a2 + ']' plsch_1 = plsch_1 + '.$PULSE_FREQ' -- WRITE('plsch_1 ', plsch_1, CR) plsch_2 = 'PLSCH[' + temp_a2 + ']' plsch_2 = plsch_2 + '.$PULSE_DUTY' -- WRITE('plsch_2 ', plsch_2, CR) SET_VAR (entry, fname, awwv, arg3, STATUS) SET_VAR (entry, fname, sch_1, arg4, STATUS) SET_VAR (entry, fname, sch_2, arg5, STATUS) SET_VAR (entry, fname, sch_3, arg6, STATUS) SET_VAR (entry, fname, sch_4, arg7, STATUS) SET_VAR (entry, fname, lsch_1, arg8, STATUS) SET_VAR (entry, fname, lsch_2, arg9, STATUS) SET_VAR (entry, fname, lsch_3, arg10, STATUS) SET_VAR (entry, fname, lsch_4, arg11, STATUS) SET_VAR (entry, fname, rsch_1, arg12, STATUS) SET_VAR (entry, fname, rsch_2, arg13, STATUS) SET_VAR (entry, fname, rsch_3, arg14, STATUS) SET_VAR (entry, fname, rsch_4, arg15, STATUS) SET_VAR (entry, fname, plsch_1, arg16, STATUS) SET_VAR (entry, fname, plsch_2, arg17, STATUS) END SET_FA_WPP
-
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...?
New code
Code
Display MorePROGRAM SET_FA_WPP TYPE AW_PLS_SCH_T = STRUCTURE PULSE_ENB : BOOLEAN PULSE_FREQ : REAL PULSE_DUTY : REAL PHASE_SFT : INTEGER ENDSTRUCTURE VAR SCH : ARRAY[7] OF AW_SCH_T VAR LSCH : ARRAY[3] OF AW_SCH_T VAR RSCH : ARRAY[3] OF AW_SCH_T VAR PLSCH : ARRAY[3] OF AW_PLS_SCH_T VAR AWWV_MODE : ARRAY[3] OF INTEGER VAR entry, STATUS : INTEGER VAR arg1, arg2, arg3 : INTEGER VAR arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11, arg12, arg13, arg14, arg15, arg16, arg17 : REAL VAR temp, fname : STRING [25] VAR temp_a1, temp_a2, temp_a3, temp_a4, temp_a5, temp_a6, temp_a7, temp_a8, temp_a9, temp_a10, temp_a11, temp_a12, temp_a13, temp_a14, temp_a15, temp_a16, temp_a17 : STRING[17] --VAR sch_num : STRING[25] VAR awwv : STRING[25] VAR sch_1, sch_2, sch_3, sch_4 : STRING[25] VAR lsch_1, lsch_2, lsch_3, lsch_4 : STRING[25] VAR rsch_1, rsch_2, rsch_3, rsch_4 : STRING[25] VAR plsch_1, plsch_2 : STRING[25] VAR data_type : INTEGER VAR real_value : REAL VAR string_value : STRING[17] VAR arg_int : INTEGER VAR arg_real : REAL BEGIN -- get integer value GET_TPE_PRM(1, data_type, arg_int, real_value, string_value, status) arg1 = arg_int GET_TPE_PRM(2, data_type, arg_int, real_value, string_value, status) arg2 = arg_int GET_TPE_PRM(3, data_type, arg_int, real_value, string_value, status) arg3 = arg_int -- get real value GET_TPE_PRM(4, data_type, arg_int, real_value, string_value, status) arg4 = real_value GET_TPE_PRM(5, data_type, arg_int, real_value, string_value, status) arg5 = real_value GET_TPE_PRM(6, data_type, arg_int, real_value, string_value, status) arg6 = real_value GET_TPE_PRM(7, data_type, arg_int, real_value, string_value, status) arg7 = real_value GET_TPE_PRM(8, data_type, arg_int, real_value, string_value, status) arg8 = real_value GET_TPE_PRM(9, data_type, arg_int, real_value, string_value, status) arg9 = real_value GET_TPE_PRM(10, data_type, arg_int, real_value, string_value, status) arg10 = real_value GET_TPE_PRM(11, data_type, arg_int, real_value, string_value, status) arg11 = real_value GET_TPE_PRM(12, data_type, arg_int, real_value, string_value, status) arg12 = real_value GET_TPE_PRM(13, data_type, arg_int, real_value, string_value, status) arg13 = real_value GET_TPE_PRM(14, data_type, arg_int, real_value, string_value, status) arg14 = real_value GET_TPE_PRM(15, data_type, arg_int, real_value, string_value, status) arg15 = real_value GET_TPE_PRM(16, data_type, arg_int, real_value, string_value, status) arg16 = real_value GET_TPE_PRM(17, data_type, arg_int, real_value, string_value, status) arg17 = real_value -- clear user screen -- WRITE (CHR(128),CHR(137)) -- for debuging - write arguments to user window -- -- WRITE('arg 1', arg1, ' ') -- WRITE('arg 2', arg2, ' ') -- WRITE('arg 3', arg3, CR) -- WRITE('arg 4', arg4, CR) -- WRITE('arg 5', arg5, ' ') -- WRITE('arg 6', arg6, CR) WRITE('arg 7', arg7, ' ') -- WRITE('arg 8', arg8, CR) -- WRITE('arg 9', arg9, ' ') -- WRITE('arg 10', arg10, CR) -- WRITE('arg 11', arg11, CR) -- WRITE('arg 12', arg12, CR) -- WRITE('arg 13', arg13, ' ') -- WRITE('arg 14', arg14, CR) -- WRITE('arg 15', arg15, CR) -- WRITE('arg 16', arg16, CR) -- WRITE('arg 17', arg17, CR) CNV_INT_STR(arg1,1,0,temp_a1) WRITE('temp', temp_a1, CR) temp_a1 = SUB_STR(temp_a1,2,1) -- WRITE('temp', temp_a1, CR) fname = 'AWE1WP0' + temp_a1 -- WRITE('fname ', fname, CR) -- -- *** temp_a2 = '' -- -- *** temp_a2 = SUB_STR(temp_a2,2,1) awwv = 'AWWV_MODE[' + temp_a2 + ']' awwv = 'AWWV_MODE[1]' -- -- WRITE('awwv ', awwv, CR) -- -- WRITE('awwv ', temp_a2, CR) CNV_INT_STR(arg3,1,0,temp_a3) temp_a3 = SUB_STR(temp_a3,2,1) CNV_INT_STR(arg2,1,0,temp_a2) temp_a2 = SUB_STR(temp_a2,2,1) awwv = 'AWWV_MODE[' + temp_a2 + ']' sch_1 = 'SCH[' + temp_a2 + ']' sch_1 = sch_1 + '.$CMD_VOLTS' -- WRITE('sch_1 ', sch_1, CR) sch_2 = 'SCH[' + temp_a2 + ']' sch_2 = sch_2 + '.$CMD_WFS' -- WRITE('sch_2 ', sch_2, CR) sch_3 = 'SCH[' + temp_a2 + ']' sch_3 = sch_3 + '.$CMD_AMPS' -- WRITE('sch_3 ', sch_3, CR) sch_4 = 'SCH[' + temp_a2 + ']' sch_4 = sch_4 + '.$CMD_WSPEED' -- WRITE('sch_4 ', sch_4, CR) lsch_1 = 'LSCH[' + temp_a2 + ']' lsch_1 = lsch_1 + '.$CMD_VOLTS' -- WRITE('lsch_1 ', lsch_1, CR) lsch_2 = 'LSCH[' + temp_a2 + ']' lsch_2 = lsch_2 + '.$CMD_WFS' -- WRITE('lsch_2 ', lsch_2, CR) lsch_3 = 'LSCH[' + temp_a2 + ']' lsch_3 = lsch_3 + '.$CMD_AMPS' -- WRITE('lsch_3 ', lsch_3, CR) lsch_4 = 'LSCH[' + temp_a2 + ']' lsch_4 = lsch_4 + '.$CMD_WSPEED' -- WRITE('lsch_4 ', sch_4, CR) rsch_1 = 'RSCH[' + temp_a2 + ']' rsch_1 = rsch_1 + '.$CMD_VOLTS' -- WRITE('rsch_1 ', rsch_1, CR) rsch_2 = 'RSCH[' + temp_a2 + ']' rsch_2 = rsch_2 + '.$CMD_WFS' -- WRITE('rsch_2 ', rsch_2, CR) rsch_3 = 'RSCH[' + temp_a2 + ']' rsch_3 = rsch_3 + '.$CMD_AMPS' -- WRITE('rsch_3 ', rsch_3, CR) rsch_4 = 'RSCH[' + temp_a2 + ']' rsch_4 = rsch_4 + '.$CMD_WSPEED' -- WRITE('rsch_4 ', rsch_4, CR) plsch_1 = 'PLSCH[' + temp_a2 + ']' plsch_1 = plsch_1 + '.$PULSE_FREQ' -- WRITE('plsch_1 ', plsch_1, CR) plsch_2 = 'PLSCH[' + temp_a2 + ']' plsch_2 = plsch_2 + '.$PULSE_DUTY' -- WRITE('plsch_2 ', plsch_2, CR) SET_VAR (entry, fname, awwv, arg3, STATUS) SET_VAR (entry, fname, sch_1, arg4, STATUS) SET_VAR (entry, fname, sch_2, arg5, STATUS) SET_VAR (entry, fname, sch_3, arg6, STATUS) SET_VAR (entry, fname, sch_4, arg7, STATUS) SET_VAR (entry, fname, lsch_1, arg8, STATUS) SET_VAR (entry, fname, lsch_2, arg9, STATUS) SET_VAR (entry, fname, lsch_3, arg10, STATUS) SET_VAR (entry, fname, lsch_4, arg11, STATUS) SET_VAR (entry, fname, rsch_1, arg12, STATUS) SET_VAR (entry, fname, rsch_2, arg13, STATUS) SET_VAR (entry, fname, rsch_3, arg14, STATUS) SET_VAR (entry, fname, rsch_4, arg15, STATUS) SET_VAR (entry, fname, plsch_1, arg16, STATUS) SET_VAR (entry, fname, plsch_2, arg17, STATUS) END SET_FA_WPP