-> 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 UngueltigerKontext.JPG](https://www.sps-forum.de/data/attachments/34/34346-8d71d2d1c45d724b5238373b1dacb09b.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
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 UngueltigerKontext.JPG](https://www.sps-forum.de/data/attachments/34/34346-8d71d2d1c45d724b5238373b1dacb09b.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