6/11/2018 4:47 PM | |
Joined: 6/4/2018 Last visit: 2/19/2020 Posts: 9 Rating: (2) |
Hi everyone, I'm using Sinutrain with the DEMO-Milling machine (840D sl 4.8 SP2). I'm trying to use the example code given HERE. I replaced the /dev/ext/1= ... to "LOCAL_DRIVE/TEST/MANI.TXT". I want to create a file in "LOCAL_DRIVE" but it's not working. My program is located in the Part Programs of the NC node. Here is my program: ;##################################################################### ;Example (remove leading semicolon for activation):/dev/ext/1 = ;//Auduser%SUNRISE@192.168.214.241/TEST/EXTOPEN/” ;##################################################################### N10 DEF INT RESULT N20 DEF BOOL EXTDEVICE N30 DEF STRING[200] OUTPUT N40 DEF INT PHASE N50 EXTOPEN(RESULT,"LOCAL_DRIVE/TEST/MANI.TXT","SYN","SHARED","APP") MSG ("Result="<< Result) M00 N60 IF RESULT > 0 N70 MSG("Error for EXTOPEN:"<< RESULT) M00 N80 ELSE N90 EXTDEVICE=TRUE N100 ENDIF N200 PHASE=4 N210 IF EXTDEVICE N220 AUSGABE=SPRINT("end phase: %D",PHASE) ;*text M00 N230 WRITE(RESULT,"LOCAL_DRIVE/TEST/MANI.TXT","Hallo") MSG("="<<RESULT) M00 N240 ENDIF N250 M30 What do I do wrong? Or maybe it's a limitation of the Trial version of Sinutrain? |
6/13/2018 10:42 AM | |
Posts: 9 Rating: (0) |
I'm not sure you need to configure the IP adresse and all this stuff . If you have a look to the documentation EXTOPEN in this document : https://cache.industry.siemens.com/dl/files/038/70265038/att_80019/v1/PGAsl_0313_en_en-US.pdf Writing in a local file doesn't need a specific definition in the extdev.ini
Sample code from this document DEF INT RESULT DEF BOOL EXTDEVICE DEF STRING[80] OUTPUT DEF INT PHASE EXTOPEN(RESULT,"LOCAL_DRIVE/my_file.txt","SYN","SHARED") IF RESULT > 0 MSG("error for EXTOPEN:" << RESULT) ELSE EXTDEVICE=TRUE ENDIF … PHASE=4 IF EXTDEVICE OUTPUT=SPRINT("end of phase: %D",PHASE) WRITE(RESULT,"LOCAL_DRIVE/my_file.txt",OUTPUT) ENDIF EXTCLOSE(RESULT,"LOCAL_DRIVE/my_file.txt") |
Last edited by: cuq at: 6/13/2018 10:44:05 AM |
|
6/19/2018 10:45 PM | |
Joined: 6/4/2018 Last visit: 2/19/2020 Posts: 9 Rating: (2) |
Is there any Sinutrain expert that could help me please? |
Follow us on