Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: Maxwell on March 15, 2013, 12:47:39 PM
-
I don't have a lot of experience with PLC's, but I've just finished my first "Real" plc application using a Do-more. (Portable field controller for remote equipment.) The hardware is deployed, the system works, everybody is happy. For my own purposes, I set up a table of user defined memory blocks, many of which are Date/Time Structures. One of the end user's customers discovered that I was recording this data and now they are asking for weekly downloads of the data directly to an electronic file format like Excel.
Since I have zero experience doing this, I was hoping that someone here could suggest an approach that had worked for them in getting data off a Do-more. I know that there are software packages like DataWorx for data collection from a PLC, but with Do-more being so new, I wasn't sure if any of them work well with it. If there is a way that I can have the PLC somehow write the file out using ladder commands, I'd love that, but I am not sure how to go about it.
The hardware has a USB connection port used to update the program on the PLC, but there is no network connectivity. If at all possible, I'd really prefer to access the data via the USB so that I don't have to modify the hardware to add ethernet connectivity. I don't need continous, real time data acquisition, just weekly data dumps when a technician comes by with a laptop.
Any suggestions for products to look at or approaches to consider would be appreciated.
-
Check out http://www.bizwaredirect.com/dataworx_pro.htm (http://www.bizwaredirect.com/dataworx_pro.htm)
Especially their Dataworx Professional.
The online information covers DL type PLCs but it uses UDP communication packets from the PLC, a communication method easily available from the Do-More. Ask them about it.
-
I'll call DataWorx Monday, but that appears to be geared more toward continuous datalogging on a network.
As a cheap solution, I tried looking at chuncks of the data on the PLC today using DataView and then exporting it to a csv file. I can see the values in DataView, but when I export, the file that gets created is of size 0 and doesn't appear to contain any data. In addition, I noticed that if I try to open the file while Do-more Designer is still open, Excel tells me the file is locked for editing and asks if I want to view as read only. If I say yes, or if I open the file after closing Do-more Designer, the file appears to be empty.
-
Any suggestions for products to look at or approaches to consider would be appreciated.
You could use a discrete input to trigger a program with a STRPRINT in a FOR/NEXT loop, to pack all the data into a string on the DoMore, and then use STREAMOUT to a serial port with a laptop connected using a simple com port capturing program. Then just click save and you have a .csv of all the data... For Free!
I could throw a sample together for you next week of it would help.
-
Any suggestions for products to look at or approaches to consider would be appreciated.
You could use a discrete input to trigger a program with a STRPRINT in a FOR/NEXT loop, to pack all the data into a string on the DoMore, and then use STREAMOUT to a serial port with a laptop connected using a simple com port capturing program. Then just click save and you have a .csv of all the data... For Free!
I could throw a sample together for you next week of it would help.
I'd hate to put you to that kind of trouble unless you just happened to have a sample around from when you've done this in the past, but I would be interested in knowing if there is a capture program that you've used and recommend. Also, would there be a program/way to capture via the USB port? (The serial port is currently connected to a c-more plus there isn't currently a serial access port available externally. There is an external USB port used for programming the Do-More & C-More. Also, since the equipment is field deployed and all connections have to be IP67 qualified, I'd really like to be able to pull the data off via the USB connection.)
I'll try Googling USB port capture programs Monday myself and see if anything pops up. Thanks again for the helpful suggestion.
-
Do-more is a super easy platform to get dats out of. Tell me more of what you are needing. I'm sure we can propose one or more methods of solving this.
-
I believe I got it all right. You will have to enter some data into the three data blocks first, But then if you close C0 then all of the data in the three data blocks will be assembled and sent out to the DoMore Logger. You can then save the file as a .csv and view in any spreadsheet.
(now that I think about it... I'm not sure if the Logger will work over the USB port... Bobo?)
Anyway, you can transmit the file over Serial or Ethernet by changing the STREAMOUT instruction.
Hope this helps.
-
Host can provide the source to DmLogger to anyone who wants it, for free. We have two versions, a C++/MFC version that ships with Do-more Designer, and a C# version that is functionally equivalent.
Anybody could take that source and tweak it to always log to disk or USB drive or wherever, possibly eliminating the UI to create a "service" or a command-line utility or ? ? ?
Note that since the source is provided for free, you will be responsible for enhancing the C++ or C# code, but we will definitely point you in the right direction.
-
Mark, Does DoMore Logger work over the USB port?
-
Mark, Does DoMore Logger work over the USB port?
No. Only Ethernet.
-
Mark, Does DoMore Logger work over the USB port?
No. Only Ethernet.
So, without more hardware he is kinda of stuck. No ethernet, and his serial is tied up with CMore...
-
Yeah, I missed that detail the first time through. Very busy right now.
Easiest answer would be to add an H2-SERIO.
-
Do-more is a super easy platform to get dats out of. Tell me more of what you are needing. I'm sure we can propose one or more methods of solving this.
I intended to reply back this morning, but for some reason I couldn't access your site from work. Anyway...
I have portable control units that get deployed to equipment in field locations out in the middle of nowhere. The controller gets hooked up to a machine and is then configured via the touch screen to run between 1 and 6 processes at times and dates scheduled by the tech who sets it up and then leaves. When the controller runs, it displays various types of run data that the original end users requested, but in addition, I set up an array/table in user defined memory blocks which records the following information every time a process is run:
- The Serial # of the machine which is being controlled. Stored as unsigned word.
- A # from 1 to 6 which designates the process being run. Stored as unsigned byte.
- A time/Date Structure for the start of the run.
- A time/Date Structure for the end of the run.
- The amount of time that the process actively ran stored in a Signed DWord. (This is more precise than the time/date structure, plus it takes into account power losses, pauses in the process, etc...)
In addition to the data stored above, I have an index number that starts at 0. Every time a process runs and data is recorded, the index is incremented by 1 and therefore, the data from the next run will get stored in the next row of the table. When I get to 599, the index number loops back to 0.
Now, the equipment is deployed in the field, and everything is fine, but one of the end user's customers decides that he needs very exact time data regarding when some activities took place. I hook up a laptop and using Do-more Designer Data View, I'm able to read the log data and give the downstream customer the info they needed. Now that they've discovered that the data exists, they want us to start providing weekly downloads of the data in csv format so that they can pull it into Excel.
That's the summary of what's going on. I understand the concept of writing the data to a string, but I'm not very knowledgeable about USB vs Serial vs Ethernet. It looked like I could access the data using software like DataWorx via Ethernet, but I wasn't sure if there was a better choice of software and wanted to see what others with more experience recommended. In addition, for reasons that I'll skip here, getting the controller units back in to modify them to support a connection method other than the existing USB connection is going to be difficult and expensive. If the only way to get the data off is via Ethernet or serial, then I'll pass that information along and see if the downstream customer is willing to foot the bill. Before I do that; however, I wanted to ask and make sure that there isn't some built in command to stream the data out the USB connection, or some inexpensive utility that was available.
Thank you for taking the time to comment and help.
-
The Bizwaredirect people were nice and think that one of the products that they have under developmet will probably allow me to access the data in a round about way, but it will be this Fall before it's available.
In the mean time, has anyone else tried to export values from Data View and ended up with empty CSV files?
-
So you do have Ethernet ports on your CPUs?
-
So you do have Ethernet ports on your CPUs?
No. I don't have Ethernet ports on the CPU's. Right now, the design incorporates a sealed, portable Pelican case with several Brad Harrison connectors on the sides of the case for connection of power and control cables. When you open the cover of the case, you gain access to a faceplate that has a c-more, sealed breaker reset buttons, a sealed power switch, and a sealed USB port. Inside the case behind the faceplate, the USB port connects to a splitter that allows the single external USB port to connect to both the C-more and Do-more programming ports. When a technician needs to check on the system or modify the settings, he opens the cover, does his thing, and then seals it back up.
It is certainly possible for me to modify the design to swap the Do-mores to the Ethernet version, to add an Ethernet switch, and to install a sealed Ethernet connector on the faceplate. In the future, I'll certainly consider designing all new systems to operate using Ethernet even if it does add to the cost. The problem now; however, is that if I convert to Ethernet, I have to try and recall units back for modification, process a design change, modify the units, requalify the units for field service, and provide the units back to the end users. In additon, if all of the units don't get returned for upgrade, I then have to maintain 2 versions going forward. All of this is doable, but before I went down that road I wanted to make sure that there wasn't a command that would allow me to stream out to USB, or some program out there that allows me to connect over the USB port. I still don't understand why I can't get the data by exporting the data view that I was using the other day to look at the logged data on one of the units. I could see the values, and when I right clicked and picked export, a CSV file was created, but it was empty. I don't have a unit in the shop at the moment cause I loaned out my development unit, but when I get it back I'll try playing with the the data view option some more. (Data View would only let me look at 99 values at a time. Maybe it will not export if you have that many open?)
Rather than do all the hardware modifications, I think I'll wait on the device being developed by BizwareDirect. Their engineer expects it to be available around September and he expects it to cost less than $100. If I do decide to convert to Ethernet instead, then I'll set up a stramout loop to cycle through the data and send it over Ethernet.
-
So you do have Ethernet ports on your CPUs?
No. I don't have Ethernet ports on the CPU's.
I didn't think you did, but you referenced Ethernet in a previous post, so I wanted to be sure. We're eyeballs deep in the 1.1 development right not, so I'm not as focused on the forum as I normally am. Realizing that it isn't possible, but it is a very simple thing to get data out with Ethernet, using any of several possible methods.
I don't know of any reason why the data view export wouldn't work, but stranger things have happened. It's working fine for me, but if you can offer any additional thoughts on what you are seeing, we'll try to dupe it and get a fix in 1.1.
-
I don't know of any reason why the data view export wouldn't work, but stranger things have happened. It's working fine for me, but if you can offer any additional thoughts on what you are seeing, we'll try to dupe it and get a fix in 1.1.
I think I've figured out why I was getting blank CSV files when I attempted to export the memory locations from DataView. I had pulled the data view of the memory locations over to a second monitor and then expanded it so that I could see more locations at a time. For some reason, if I leave the data view docked on the lower left corner of Do-more Designer the way that it is when it first opens, the CSV file will be created correctly when I export the data. When I attempt to export the memory locations from the undocked DataView window, that's when I get the problem of the empty CSV file. I guess this is just an "undocumented feature" of Do-more Designer. If anyone else runs into the problem of empty CSV files being created, try leaving the DataView window docked as it is when it first opens.
-
We leave our best features undocumented! ;)
We'll look into it, and should have it fixed in the upcoming 1.1.
-
Easily duped. Thanks for following up!
-
Host can provide the source to DmLogger to anyone who wants it, for free. We have two versions, a C++/MFC version that ships with Do-more Designer, and a C# version that is functionally equivalent.
Anybody could take that source and tweak it to always log to disk or USB drive or wherever, possibly eliminating the UI to create a "service" or a command-line utility or ? ? ?
Note that since the source is provided for free, you will be responsible for enhancing the C++ or C# code, but we will definitely point you in the right direction.
Could I get this code in C# version?
-
Could I get this code in C# version?
I will email you to confirm.
-
Thanks