Open-source software for PC/CLX Communication?

dcooper33

Lifetime Supporting Member + Moderator
Join Date
Jun 2011
Location
Rogers, AR
Posts
717
Hi all,

Has anyone ever heard of any software similar to libnodave, but for use with the AB family of processors?

I'm wanting to experiment with reading/writing values to a ML1100 processor from an Excel spreadsheet, but I don't want to pay for RSLinx Pro for home use.

I looked into http://www.ingearactivex.com/ which seems like a valid alternative to an OPC server, but at $300, is still too steep for my needs. Just wondering if anyone has seen any free-ware for this kind of thing or has written any code on their own to open a connection to a PLC from excel.

Thanks,
Dustin

🍻
 
Hi,

We have an OPC DA server for $49 that can communicate with the ML1100.
We have a demo that you can try.

We also have example projects for using Excel as an OPC client. The two examples we have are for MODBUS and Logix. Modifying the example for PCCC will be easy. Contact support if you need some help.
 
Thanks for the replies.

I've used Archie's AdvancedHMI a little bit and I quite like it. I've learned a little VB.net by messing around with it, but I don't know enough to transfer object values from an AdvancedHMI app to a spreadsheet. Anyone have any links or code on how to do this?
 
Hi,

We have an OPC DA server for $49 that can communicate with the ML1100.
We have a demo that you can try.

We also have example projects for using Excel as an OPC client. The two examples we have are for MODBUS and Logix. Modifying the example for PCCC will be easy. Contact support if you need some help.

Mark,
I will give the PCCCOPC demo a try and see how it works.
Thanks.
 
I've used Archie's AdvancedHMI a little bit and I quite like it. I've learned a little VB.net by messing around with it, but I don't know enough to transfer object values from an AdvancedHMI app to a spreadsheet. Anyone have any links or code on how to do this?
I recently had to do something very similar. The way I found that worked quite well was to use EPPlus:

http://epplus.codeplex.com/

This DLL was added as a reference to AdvancedHMI, then using the ReadAny methods of the AdvancedHMI drivers, I obtained the data from the PLC, then used EPPlus to create an Excel spreadsheet file where I stored the values. The file can then be opened using Excel.
 
Interesting. I was was working with him a little outside the forum to see if we could come up with a solution. I showed him the Excel COM library that you can reference.

I guess the benefit of the EPPlus library would be that you don't have to have Excel on the the machine collecting the data?
 
I guess the benefit of the EPPlus library would be that you don't have to have Excel on the the machine collecting the data?
That is a huge benefit and also it is lighter weight and faster. I did find one issue and that is to make sure your code closes the Excel file, otherwise the file is corrupt. Although I did find that if it corrupts the file, Excel has a recovery feature that works. I discovered this when I stopped the program before it completed the write and close methods.

On the application I recently did, the customer wanted a certain formatting of the spreadsheet. I let them create a blank file with Excel, I then used that as the base file. My code would open, add data, then Save As. That gave them the ability to modify their format by simply modifying the base file.
 
That is a huge benefit and also it is lighter weight and faster. I did find one issue and that is to make sure your code closes the Excel file, otherwise the file is corrupt. Although I did find that if it corrupts the file, Excel has a recovery feature that works. I discovered this when I stopped the program before it completed the write and close methods.

On the application I recently did, the customer wanted a certain formatting of the spreadsheet. I let them create a blank file with Excel, I then used that as the base file. My code would open, add data, then Save As. That gave them the ability to modify their format by simply modifying the base file.

Sweet, I'll have to check into it. Just to be clear, I wasn't trying to minimize the benefit of being able to working with Excel files without having Excel installed. I wish I would have known about this a while ago as I reworked a project because the machine that my program was ultimately going on wasn't going to have Excel on it. I ended up doing a text file.
 
By adapting a piece of code that I got from dmroeder, I was able to set up a simple vb app that transferred a series of integers and floats to an Excel 2010 spreadsheet using the DF1Comm driver. (y)

I do have another question about reading arrays on the CLX driver. On the DF1 driver reading from the ML1100, if I tried to read a block of 10 integers using "DF1Comm1.ReadAny("N7:0", 10)" then it would return only the value in N7:0 and place it in ten consecutive cells. If I want to read an array on a CLX processor, say "DINT_Array[0], L10" will something like this work?

Code:
ws.Cells("B2:B11").Value = EthernetIPforCLXComm1.ReadAny("DINT_Array[0]", 10)

Or would I have to use a loop to index through the array, reading and loading one at a time?

Thanks,
Dustin
 
That is a huge benefit and also it is lighter weight and faster. I did find one issue and that is to make sure your code closes the Excel file, otherwise the file is corrupt. Although I did find that if it corrupts the file, Excel has a recovery feature that works. I discovered this when I stopped the program before it completed the write and close methods.

On the application I recently did, the customer wanted a certain formatting of the spreadsheet. I let them create a blank file with Excel, I then used that as the base file. My code would open, add data, then Save As. That gave them the ability to modify their format by simply modifying the base file.

So by downloading the EPPlus file, does that open up another reference that can be used in the AdvancedHMI app? And you're saying that extracting values using EPPlus is more efficient than using the Excel COM library?

Just curious. I have Excel on the machine that I will be using, but it would be interesting to learn another method.
 
I do have another question about reading arrays on the CLX driver. On the DF1 driver reading from the ML1100, if I tried to read a block of 10 integers using "DF1Comm1.ReadAny("N7:0", 10)" then it would return only the value in N7:0 and place it in ten consecutive cells. If I want to read an array on a CLX processor, say "DINT_Array[0], L10" will something like this work?

Code:
ws.Cells("B2:B11").Value = EthernetIPforCLXComm1.ReadAny("DINT_Array[0]", 10)
Or would I have to use a loop to index through the array, reading and loading one at a time?

So I tried this today on a L61 processor, and it worked the same way as the DF1 driver. Is there some other method for reading arrays with the CLX driver, or is there something I'm missing here? As I said, I can use a For-Next in the VB sub, but that method is painfully slow... o_O

Cheers,
Dustin

🍻
 
Dustin, I can speak confidently regarding the CLX driver: reading arrays is supported. I think things are going wrong on the Excel side. If you were to bring the information to variables in VB you would find the correct data stored in the variables.

You could prove this by bringing the data into an array in VB, then displaying the data back to you via message box or some other means.
 
Dustin, I can speak confidently regarding the CLX driver: reading arrays is supported. I think things are going wrong on the Excel side. If you were to bring the information to variables in VB you would find the correct data stored in the variables.

You could prove this by bringing the data into an array in VB, then displaying the data back to you via message box or some other means.

I figured as much. I don't doubt that the CLX driver supports array reads. I'm just trying to achieve the same function as the DDE Request on RSLinx. What I THINK is happening is that the CLX driver is trying to load the entire array of 10 integers into each of the 10 cells.

I'm wondering if I can move the PLC array to a temp vb array, then use the

Code:
Ws.Range("B2:B11").Value = Temp_Array

I'm sure there's an easy way to do this, I'm just too green with vb to figure it out. Anyway, thanks again for all the help.
 
That code won't work. I think you will get the first value in your array in all the cells. A For/Next loop will probably be your only option.
 

Similar Topics

Does anyone here have suggestions of open source SCADA software that can be used for Mitsubishi PLC FX3U Series. I want to monitor its data...
Replies
2
Views
2,822
If you like the idea of open source software, have a look at this for open source: http://reprap.org/wiki/Main_Page...
Replies
13
Views
7,048
and then when i open the windowmaker, intouch is shutdown... that's not work that's demo I have 30days demo
Replies
3
Views
184
GitHub Link: https://github.com/Automation-Standard/Open-Industry-Project This is a little side project I've been working on that I felt would be...
Replies
14
Views
3,431
Hi guys. I have collaborated with a friend from the Netherlands to bring together a Sparkplug B library for codesys. Check it out here at...
Replies
2
Views
1,581
Back
Top Bottom