News:

  • March 23, 2023, 06:34:44 AM

Login with username, password and session length

Author Topic: DS5 V-mem Export to CSV  (Read 5823 times)

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
DS5 V-mem Export to CSV
« on: July 13, 2016, 09:43:46 PM »
I think I have erred. Do-more has a really nice ability to export a range of memory. I didn't opt for the Do-more on this project, though I would have jumped on the Do-more brick if it were available at the moment.

So, I need to export V10000-V17777 from a D0-06 without it being too painful. I found the posts regarding using Print All and that could work for me, but requires a good bit of manipulation to get from a PDF to an Excel importable text file due to the page numbers, etc.

Also, I really need these locations to be signed decimal, double words. I have not found a means of setting these without using memory manager to very tediously work through every location by hand with multiple clicks - and I can't set it as signed either. Ugh.

I have tried to decipher the .VD and .VF files and must admit I am clueless on these as I have not managed any progress at all.

And I know about data view exports, but it would take 21 data views to get the entire range I need.

Anyone got a useful suggestion?*

*Beyond the obvious, "DOH! I coulda hadda Do-more!"
« Last Edit: July 13, 2016, 10:16:53 PM by Mike Nash »

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5820
  • Yes Pinky, Do-more will control the world!
Re: DS5 V-mem Export to CSV
« Reply #1 on: July 13, 2016, 10:19:31 PM »
Um...I have nothing to offer.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
Re: DS5 V-mem Export to CSV
« Reply #2 on: July 13, 2016, 11:24:02 PM »
Yeah, I kinda figured I had little hope on this when I found nothing online more than I posted above.

I've never really needed this before except for one DS-Data project, which was more of a DS-Data type of project and the Do-more I just finished which is long term, but not the data export part.

This is a short-life need which may never get used again, so I can stomach it this time. That's also the reason for not spending the extra on the Do-more for this, well that and an "all ya gotta do" attitude on my part.  :-[

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5820
  • Yes Pinky, Do-more will control the world!
Re: DS5 V-mem Export to CSV
« Reply #3 on: July 13, 2016, 11:51:19 PM »
I constantly chuckle at the people who spend a week of engineering time attempting to make a Click do something Do-more could do in one rung, but soon you won't have to make that compromise. We won't be quite as cheap as Click initially, we will have small units that start at $199 with 10 I/O, but further down the road we want to add a smart relay class device that starts under $100. Subset instruction set, but still fully Do-more, and completely portable to big-boy Do-more.
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

BobO

  • Host Moderator
  • Hero Member
  • *****
  • Posts: 5820
  • Yes Pinky, Do-more will control the world!
Re: DS5 V-mem Export to CSV
« Reply #4 on: July 14, 2016, 02:55:44 PM »
Just to clarify, I wasn't making fun of you for using DL06 over Do-more, but the "all ya gotta do" attitude from engineers where we tend to under-appreciate the value of our time and and over-estimate our prowess at extracting blood from turnips. But soon...
"It has recently come to our attention that users spend 95% of their time using 5% of the available features. That might be relevant." -BobO

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
Re: DS5 V-mem Export to CSV
« Reply #5 on: July 14, 2016, 04:22:33 PM »
I do understand. Sometimes the hardware is plenty adequate right up until the day you need to add a feature and you don't have floating point math and you really, really wish you did.

This job was borderline as it is short term and while the Do-more price is OK, the rack and H2-CTRIO-2 (never mind you still have nearly nil I/O) pushed the cost quite a ways up. But yes, labor would have been far less.

Anyway, the Kep OPC demo actually does work to suck out all the data I need since I only need to do that a few times for this project. The PLC records the values, the Cmore micro can display it in chunks and the OPC can grab the whole table for analyzing in Excel.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3483
  • Darth Ladder
Re: DS5 V-mem Export to CSV
« Reply #6 on: July 15, 2016, 12:10:50 AM »
I'd write a script in my preferred HMI (DAQ Factory) to loop through and grab 100 registers at a time, create an array, and write a CSV file to disk.  Should take 15-30 minutes, including any script debugging.  Plus then you have it if ever you need it again.

I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Controls Guy

  • Internal Dev
  • Hero Member
  • ****
  • Posts: 3483
  • Darth Ladder
Re: DS5 V-mem Export to CSV
« Reply #7 on: July 15, 2016, 12:14:34 AM »
Anyway, the Kep OPC demo actually does work to suck out all the data I need since I only need to do that a few times for this project. The PLC records the values, the Cmore micro can display it in chunks and the OPC can grab the whole table for analyzing in Excel.

Ah, OK.  I posted before I got this far down the thread.  Looks like you found something workable.
I retract my earlier statement that half of all politicians are crooks.  Half of all politicians are NOT crooks.  There.

Mike Nash

  • Hero Member
  • *****
  • Posts: 632
Re: DS5 V-mem Export to CSV
« Reply #8 on: July 15, 2016, 07:42:00 PM »
I have just a few little tweaks I didn't quite get to today, but it really is amazing how much more difficult the Koyo programming is versus the Do-more.

The only way I could find to quickly(ish) zero out 4080 V-mem locations was the FILL command, and it can only do 255 at a time which means 16 LD LDA FILL iterations in a For-Next Loop Subroutine. Sure is a lot of weird addresses when you can't do them as 256 registers jumps. Do-more requires one MEMCLEAR instruction - not to mention no octal, hex, binary/decimal/signed decimal confusion.

The KEPdirect is not blazingly fast sucking out 2040 Longs at 9600 baud, but it's not slow at all either. The ethernet is quicker, but I didn't need that for this job. You do need to disconnect the DS5 from the port before trying to use the KEP/Excel though.

The CTRIO Workbench2 got me messed up today though. I'll mention that in another thread.