02-13-2019 04:17 AM
I need a data communication between Omron PLC and Labview. According to my researches, we must specify the eds file of Labview to Omron PLC. Someone mentioned to use Generic EDS file for communicating with Labview. We tried this method but it couldn't work. Then i tried these instructions.Finally, i try to generate EDS file via EZ-EDS program. Unfortunately, i haven't accomplished any solution. Can you help me?
05-22-2019 12:56 PM
Try converting the Omron dlls: CIPCompolet.dll, CIPCoreDotNet.dll, - 14 dlls in total to .net controller
as done here
https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z000000kJLKSA2&l=en-US
Then just use the .fp files created.
07-29-2019 09:52 AM
I was able to make Omron (CJ2) with LabVIEW over EIP using my EDS file ( attached here ). Make sure to modify MajorRev attribute to your EIP driver version. For example, if you have EIP Drivers version 2018, then use MajorRev 18, else use 17.
Let me know if you run into issues.
Vijay
07-29-2019 10:25 AM
I used an OPC client "https://www.kepware.com/en-us/products/kepserverex/suites/omron-suite/" or NI has an OPC client/server you could also use.
And the Network Variable Library (The NI Variable Engine Must be running via Task Manager ) functions:
SetWaitCursor(1);
status = CNVCreateSubscriber ("\\\\computer name \\PLC Tag library\\OP2000_BCR_DONE", DataCallback, StatusCallback, 0, 10000, 0, &scub);
SetWaitCursor(0);
status = CNVCreateReader ("\\\\computer name\\PLC Tag library\\OP2000_BCR_DONE", StatusCallback, 0, 5000, 0, &newhand);
Delay(0.2);
CNVDispose (scub);
///----------------------------------------------------------------------------
/// HIFN Network Variable Data Callback - called whenever the data is updated.
/// HIFN NOTE: This callback is called on a worker thread and not the main thread.
/// HIPAR handle/Handle of the Network Variable connection
/// HIPAR data/Handle of the new Network Variable data
/// HIPAR callbackData/User specified callback data
///----------------------------------------------------------------------------
static void CVICALLBACK DataCallback (void * handle, CNVData data,
void * callbackData)
{
unsigned int nDims;
CNVDataType type;
char *mydata = malloc(30);
int status = FAILURE;
CNVGetDataType (data, &type, &nDims); //mydata machine_msg
status = CNVGetScalarDataValue (data, CNVString, &mydata);
sprintf(machine_msg,"%s", mydata);
CNVDisposeData (data);
}
///----------------------------------------------------------------------------
/// HIFN Network Variable Status Callback called whenever connection status changes.
/// HIFN NOTE: This callback is called on a worker thread and not the main thread.
/// HIPAR handle/Handle of the Network Variable connection
/// HIPAR status/The new status of the Network Variable connection
/// HIPAR error/The error, if any, in the Network Variable connection
/// HIPAR callbackData/User specified callback data
///----------------------------------------------------------------------------
static void CVICALLBACK StatusCallback (void * handle,
CNVConnectionStatus status, int error, void * callbackData)
{
if (error < 0)
{
puts("\nERROR...");
}
else
{
switch (status)
{
case CNVConnecting:
puts("\nConnecting...");
break;
case CNVConnected:
puts("\nConnected");
break;
case CNVDisconnected:
puts("\nDisconnected!!!");
break;
}
}
}
10-05-2023 01:38 AM
Hello Vijay can you share the VI and how you used the EDS file
11-30-2023 08:37 AM
I would also like to know. It seems that he used the EIP toolkit to develop the VIs.
The example project shipped with LabVIEW just like this.
However, none of these VIs demostrate how to do the communication with EDS file.
Should we import the LabVIEW EDS to Omron's Network Configurator software?