TPReadNum problem, I think..
artix
✭
Hello,
I get error on the line below marked in Bold. What this thing is supposed to do is load a .mod program file and if it doesnt exist you get the option to re-try (after you moved the .mod file to the right location for example) or enter a new program number.
It works as intented if I remove the whole "CASE 3" section of the TEST..
Can someone help me figure out what the problem is?
PROC LaddaModul()
VAR num key_in;
Var num NyttNr;
VAR num key_in;
Var num NyttNr;
ReloadNum:
stArtnr:=NumToStr(nArtnr,0);
stFileName:="Art"+stArtnr+".mod";
EntryNewNum:
stPathFile:=stPath+"/"+stFileName;
TPWrite "Letar efter fil "+stFileName;
IF IsFile (stPathFile) THEN
TPWrite "Filen laddas!";
StartLoadDynamic, stPathFile:=stFileName, loadsessid1;
WaitLoad loadsessid1;
WaitTime 2;
TPWrite "Filen A?r laddad!";
ArtnrValid:=TRUE;
ELSE
stArtnr:=NumToStr(nArtnr,0);
stFileName:="Art"+stArtnr+".mod";
EntryNewNum:
stPathFile:=stPath+"/"+stFileName;
TPWrite "Letar efter fil "+stFileName;
IF IsFile (stPathFile) THEN
TPWrite "Filen laddas!";
StartLoadDynamic, stPathFile:=stFileName, loadsessid1;
WaitLoad loadsessid1;
WaitTime 2;
TPWrite "Filen A?r laddad!";
ArtnrValid:=TRUE;
ELSE
TPReadFK key_in,stFileName+" finns Inte!","FA?rsA?k igen","","Nytt Artnr","","";
TEST key_in
CASE 3:
TPReadNum NyttNr, ?_oSkriv in nytt artikelnummer.?_o;
stFileName:="Art"+NumToStr(NyttNr,0)+".mod";
GOTO EntryNewNum;
DEFAULT :
TPWrite "FA?rsA?ker igen...";
GOTO ReloadNum;
ENDTEST
TEST key_in
CASE 3:
TPReadNum NyttNr, ?_oSkriv in nytt artikelnummer.?_o;
stFileName:="Art"+NumToStr(NyttNr,0)+".mod";
GOTO EntryNewNum;
DEFAULT :
TPWrite "FA?rsA?ker igen...";
GOTO ReloadNum;
ENDTEST
ArtnrValid:=FALSE;
ENDIF
ENDPROC
ENDIF
ENDPROC
0
Comments
-
No one? Aww...0
-
HiChange ?_owith " and it works.Best regardsMarcel0
-
Of course!It must have changed it as I copied things between different text editors.Thank you.0
Categories
- All Categories
- 5.5K RobotStudio
- 396 UpFeed
- 18 Tutorials
- 13 RobotApps
- 297 PowerPacs
- 405 RobotStudio S4
- 1.8K Developer Tools
- 250 ScreenMaker
- 2.8K Robot Controller
- 316 IRC5
- 61 OmniCore
- 7 RCS (Realistic Controller Simulation)
- 801 RAPID Programming
- AppStudio
- 3 RobotStudio AR Viewer
- 18 Wizard Easy Programming
- 105 Collaborative Robots
- 5 Job listings