Ungueltiger Kontext Error message While file transfer

herleraja

Level-1
Beiträge
3
Reaktionspunkte
0
Zuviel Werbung?
-> Hier kostenlos registrieren
Hi,


I was trying to upload(and download) a file from my computer to Simantic S7 300 PLC. (I'm using AGLINK API to do so)


I tired with many options but i'm not able to do a file transfer. I'm pretty much new to SPS programming, so i'm not able to understand why i'm always getting "Ungueltiger Kontext Error message" or "Invalid context".


I have tried following code snippet, which also shows the same error.


public Int32 doNCK_CopyFromNC(Int32 connnr, Int32 timeout)
{
Int32 result = 0;
String filename = "";
Int32 neededlen = 1000;
Byte[] buff = new Byte[neededlen];

result = AGL4.NCK_CopyFromNC(connnr, filename, buff, out neededlen, timeout);
if(result != AGL4.AGL40_SUCCESS)
{
// Error happened
String errormsg = "";
AGL4.GetErrorMsg(result, out errormsg);
}
return result;
}


I have used a sample application that provided by DeltaLogic Company, but which giving similar issue.
https://drive.google.com/file/d/17C-TotWmFGKSEbCAxQPkOOYktBB9cPRG/view?usp=sharing
UngueltigerKontext.JPG





Since majority of the software forum and tools are in German i'm getting difficult to search this error in internet. Can anyone here please help me on resolving this issue ?




Regards
HERLE
 
Zuviel Werbung?
-> Hier kostenlos registrieren
Thanks for super quick reply.

I wanted to upload a G code file(for some CNC machine). Or some program that i wanted to execute after uploading into the PLC.

Regards
HERLE
 
You can't load a CNC programm to the PLC, you must load it in the NCK. Please tell me the MLFBNr of your "PLC" after connection.
 
Ok. I heard [FONT=&quot]Sinumerik 840D [/FONT]has internally a PLC inside it, so i was trying to load file to PLC. But looks like i entered through wrong way.

MLFBNr : 6ES7 314-6EH04-0AB0
 
Zurück
Oben