You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old July 21st, 2012, 03:27 PM   #1
bmacattack33
Lifetime Supporting Member + Moderator
United States

bmacattack33 is online now
 
bmacattack33's Avatar
 
Join Date: Jun 2011
Location: Bentonville, AR
Posts: 523
Open-source software for PC/CLX Communication?

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

__________________
"Just plug the thing in. What's the worst that could happen?"
  Reply With Quote
Old July 21st, 2012, 03:32 PM   #2
jrwb4gbm
Member
United States

jrwb4gbm is offline
 
Join Date: Apr 2002
Location: NC
Posts: 1,433
Just a blind guess since I really don't know, maybe there is something in Archies' Open Source AdvancedHMI project that will act as an interface. See this thread if you haven't seen the project.
http://www.plctalk.net/qanda/showthread.php?t=42656
Another thread that may be of interest:
http://www.plctalk.net/qanda/showthread.php?t=68127

Last edited by jrwb4gbm; July 21st, 2012 at 03:38 PM.
  Reply With Quote
Old July 21st, 2012, 03:53 PM   #3
Mark-
Lifetime Supporting Member
United States

Mark- is offline
 
Join Date: Nov 2008
Location: Texas
Posts: 313
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.
__________________
Good luck,

Mark
PeakHMI
  Reply With Quote
Old July 21st, 2012, 04:06 PM   #4
bmacattack33
Lifetime Supporting Member + Moderator
United States

bmacattack33 is online now
 
bmacattack33's Avatar
 
Join Date: Jun 2011
Location: Bentonville, AR
Posts: 523
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?
__________________
"Just plug the thing in. What's the worst that could happen?"
  Reply With Quote
Old July 21st, 2012, 04:33 PM   #5
bmacattack33
Lifetime Supporting Member + Moderator
United States

bmacattack33 is online now
 
bmacattack33's Avatar
 
Join Date: Jun 2011
Location: Bentonville, AR
Posts: 523
Quote:
Originally Posted by Mark- View Post
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.
__________________
"Just plug the thing in. What's the worst that could happen?"
  Reply With Quote
Old July 23rd, 2012, 05:34 PM   #6
Archie
Member
United States

Archie is offline
 
Archie's Avatar
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 772
Quote:
Originally Posted by bmacattack33 View Post
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.
__________________
Archie Jacobs
Manufacturing Automation, LLC

www.advancedhmi.com

PLC Related Videos

Hands-On PLC Training
  Reply With Quote
Old July 23rd, 2012, 05:41 PM   #7
dmroeder
Lifetime Supporting Member
United States

dmroeder is offline
 
dmroeder's Avatar
 
Join Date: Apr 2006
Location: Vancouver, WA
Posts: 1,179
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?
__________________
Get 2 GB of free space from Dropbox using my referral.
  Reply With Quote
Old July 23rd, 2012, 06:18 PM   #8
Archie
Member
United States

Archie is offline
 
Archie's Avatar
 
Join Date: May 2002
Location: Orangeburg, SC
Posts: 772
Quote:
Originally Posted by dmroeder View Post
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.
__________________
Archie Jacobs
Manufacturing Automation, LLC

www.advancedhmi.com

PLC Related Videos

Hands-On PLC Training
  Reply With Quote
Old July 23rd, 2012, 06:27 PM   #9
dmroeder
Lifetime Supporting Member
United States

dmroeder is offline
 
dmroeder's Avatar
 
Join Date: Apr 2006
Location: Vancouver, WA
Posts: 1,179
Quote:
Originally Posted by Archie View Post
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.
__________________
Get 2 GB of free space from Dropbox using my referral.
  Reply With Quote
Old July 23rd, 2012, 10:42 PM   #10
bmacattack33
Lifetime Supporting Member + Moderator
United States

bmacattack33 is online now
 
bmacattack33's Avatar
 
Join Date: Jun 2011
Location: Bentonville, AR
Posts: 523
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.

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
__________________
"Just plug the thing in. What's the worst that could happen?"
  Reply With Quote
Old July 23rd, 2012, 10:47 PM   #11
bmacattack33
Lifetime Supporting Member + Moderator
United States

bmacattack33 is online now
 
bmacattack33's Avatar
 
Join Date: Jun 2011
Location: Bentonville, AR
Posts: 523
Quote:
Originally Posted by Archie View Post
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.
__________________
"Just plug the thing in. What's the worst that could happen?"
  Reply With Quote
Old July 24th, 2012, 06:09 PM   #12
bmacattack33
Lifetime Supporting Member + Moderator
United States

bmacattack33 is online now
 
bmacattack33's Avatar
 
Join Date: Jun 2011
Location: Bentonville, AR
Posts: 523
Quote:
Originally Posted by bmacattack33 View Post
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...

Cheers,
Dustin

__________________
"Just plug the thing in. What's the worst that could happen?"
  Reply With Quote
Old July 24th, 2012, 10:11 PM   #13
dmroeder
Lifetime Supporting Member
United States

dmroeder is offline
 
dmroeder's Avatar
 
Join Date: Apr 2006
Location: Vancouver, WA
Posts: 1,179
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.
__________________
Get 2 GB of free space from Dropbox using my referral.
  Reply With Quote
Old July 24th, 2012, 10:54 PM   #14
bmacattack33
Lifetime Supporting Member + Moderator
United States

bmacattack33 is online now
 
bmacattack33's Avatar
 
Join Date: Jun 2011
Location: Bentonville, AR
Posts: 523
Quote:
Originally Posted by dmroeder View Post
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.
__________________
"Just plug the thing in. What's the worst that could happen?"
  Reply With Quote
Old July 25th, 2012, 08:17 AM   #15
dmroeder
Lifetime Supporting Member
United States

dmroeder is offline
 
dmroeder's Avatar
 
Join Date: Apr 2006
Location: Vancouver, WA
Posts: 1,179
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.
__________________
Get 2 GB of free space from Dropbox using my referral.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
RSI developing software BobB LIVE PLC Questions And Answers 16 May 21st, 2010 02:52 PM
Why pay for PLC programming software? Stephen Luft LIVE PLC Questions And Answers 267 April 13th, 2010 11:20 AM
Siemens TP Designer Software Problem SNK LIVE PLC Questions And Answers 8 November 30th, 2006 08:10 AM
PLC 2/16 communication cabe and required software kodaic LIVE PLC Questions And Answers 2 September 5th, 2005 06:19 AM
AI2 software for PLC2 - online communication question Contr_Conn LIVE PLC Questions And Answers 7 November 10th, 2003 04:58 AM


All times are GMT -5. The time now is 10:53 PM.


.