Reading Data Log files in VB2008?

Isaacx

Member
Join Date
May 2010
Location
Pen Argyl
Posts
22
Ok guys, I need to write an HMI program in VB express 2008 that will allow the user to input different profiles and get different charts and graphs (.csv files). My question is whether or not the DLG instruction is the best way to do this, and then somehow in VB, access that file. Or, can I just send all the data to new registers (N12 for example) and somehow read that entire register when the user wants the data? Keep in mind that I am pretty new to both VB and Logix, so help in the programming/syntax of both would be greatly appreciated.

Oh, equipment! It's a Micrologix 1400 BXB with a 1762 IF4 and 1762 OF4...I'm using ethernet connections. If you need anything else, just let me know.
 
Isaacx,
Once the data is in .CSV format I just use Excel & macro to get the charts/graphs. I use the RedLion G3 HMI to log the data to a compact flash card. The log files on the flash card can then be transfered via FTP to any PC on the Ethernet network. Of course the graph can be viewed on the HMI as well.

If you intend to use VBExpress to build a graphing/charting user interface from scratch, then my hats off to you because that is way over my capabilities.

Rockwell makes a software package that database logs & then presents in pretty/flexable HTML based charts. It's called BizWare. It can cost many thosands of dollars to purchase & setup, but is very slick once running.

BD
 
Thanks for the info guys...unfortunately, most of it I can't utilize. Our customer has an existing test system consisting of a cylinder controlled by a bidirectional valve that we are automating via the 1400. Therefore, they are doing this as low-cost as possible, so I have to work within the confines of their system.

Basically, their HMI will have 6 different steps, each one containing a force entry and a position entry. They hit the "START" button on the screen, and the cylinder takes off. The whole time I will be data logging the values of each within the 1400 (since it is a small project to begin with and shouldn't burden the PLC). At the end of the test, I plan to just have a button that will grab the .csv files and just save them to the customers computer, and maybe give them a quick chart for reference.

So again, while I greatly appreciate the above input, my biggest questions are:

1) How to access the files created by a DLG instruction in RSLOGIX 500 (or if this is even the best way to do it)
2) How to bring those file to VB
3) Just some basic VB syntax help with some of the processes I need to do. (I realize this is PLC.net, but I'm sure someone on here knows this stuff way better than i do).

Thanks again guys

Oh, and Panic, I have tested that ADVANCED HMI software and it is sweet! I plan to use some of it to bring the HMI some character.

And one last thing...my boss gave me ASCOMM3.net driver to communicate with the PLC through VB. Anyone ever used it?
 

This site would be great for what you are doing. It shows you how to connect to the PLC with VB. I use sourceforge.net to get drivers to connect to PLC's. I use it a lot with connecting VB to SLC's and Micrologix PLC's.

If you go to YouTube there is a video about a free HMI for Allen Bradley. It takes you step by step on how to make an HMI from VB.
 
This site would be great for what you are doing. It shows you how to connect to the PLC with VB. I use sourceforge.net to get drivers to connect to PLC's. I use it a lot with connecting VB to SLC's and Micrologix PLC's.

If you go to YouTube there is a video about a free HMI for Allen Bradley. It takes you step by step on how to make an HMI from VB.

I know about that software, but my boss wants me to use this ASComm.net driver by Automated Solutions
 
Ok, I understand what you are asking for and thats a lot of information for this site. I can give you the basics I guess.

First, if you want a time stamp on the information then DLG would be a good way to go. If a time stamp is not critical then I would just use a FLL.

The DLG would require a number of registers to be accessed to get the information needed. The FLL would only require on register to be accessed.

On the VB side you would probably use a FOR loop to accomplish the copying of the data into a spreadsheet (.csv file). Writing that code will take a bit of time. Your ASComm.net driver should give you access to examples and guidance. It seems to have quite a bit on their site if you are a customer.

Hope this helps you some.
 
ok, thanks for that.

In regards to the DLG instruction...when I set up a new que(spelling?? i think that's spanish haha) can I just have it read the analog output card like 02:0.0(from the force transducer)? Or is it better to move that analog output to a separate register like...N12 and read from that?

then my next question is...as soon as I have the correct register assigned, how do I access those logs, whether i'm trying to bring them to VB or not...i've been confused by this for a long time.
 
i got software to read the data log files....now, How do I assign a tag in Logix 500? is that the same thing as the symbol I assign to data?
 
A little known feature about the EthernetIPforSLC driver that is part of AdvancedHMI is that you can upload/download the PLC program files. You can also read the data file directory from the PLC to get the existing data files and length of each one.

You can see how to use those features by downloading the DF1Comm project from sourceforge. The EthernetIP driver is used exactly the same way as the DF1Comm.

To my knowledge, none of the commercially available drivers have those features. And not counting the free factor.
 
Thanks archie...that is great info. My boss quoted the customer an OPC package from Automated Solutions, so i am forced to use that. I would love to use the great looking form tools from the advanced HMI, but whenever I put in the ASComm component (the Automated Solutions product) onto my form, I start to get all these errors with the advancedHMI components...specifically the digital meters saying that their modifiers are only "friend". Oh, well...unless someone knows a way around this, I'll just have to settle for a boring looking, but working HMI.
 

Similar Topics

Greetings, Long time troller, first time poster.... I'm currently working with a network (Ethernet via IP radios) of about 50 Micrologix 1400...
Replies
1
Views
3,267
Hello! (I'm Using FactoryTalk View SE 8) I'm stuck in a project, I need to read the last n-data from a datalog, In order to make a customizable...
Replies
11
Views
5,862
I can’t able to get data from IN16I analog card, signal type 4-20 ma System configuration Rack 1 Slot-0, L551 CPU Slot-1, BSN Rack 2...
Replies
1
Views
2,082
How are data log files read from an external flash card? Once data is written to a flash card, how does one get it into something useful like an...
Replies
8
Views
22,126
Hello I have a s7-1200 and I would like to read the tags present in this controller with my controllogix controller. The two controllers don't use...
Replies
5
Views
176
Back
Top Bottom