Jump to content

petehorn

NI
  • Posts

    1
  • Joined

  • Last visited

About petehorn

Profile Information

  • Gender
    Not Telling

LabVIEW Information

  • Version
    LabVIEW 2012
  • Since
    2003

petehorn's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi everyone, I had this (possibly hairbrained and madcap ) idea a few weeks back - and have been trying to figure out a solution to it since. I've been playing around with LV OOP a lot recently and thought it would be really cool if I never had to make an FGV again. I'm not sure if someone has done this in the past but I thought I would give it a go. My thought was that I could create a heirachy of LV classes for different data types and then when I need a new FGV, just create a sub-class off one of the data type classes to build a new FGV. I've now got this working for standard data types (string, boolean and numeric - I could easily build classes for others if needed but haven't done so yet). Check out the attached code. Because I'm using OOP and dynamic terminals in places, I can't use the standard FGV uninitialised shift register, so am using a single element queue to store the data. This seems to be working OK now (feel free to use the code if you like - but I'm not promising it is bug free). The part that I'm having real trouble with is supporting custom data types. I thought it would be really cool if the user could create a new FGV class - and then add in private data to the class which would then be converted to be the data type stored in the FGV. The problem I'm having with this is the connector pane on the FGV, as I can't find a way to easily update the data type on the input and output to the FGV. I have tried a few ways but none seem like less hassle than just creating the FGV from scratch anyway...... Probably the easiest method I've found is to create separate dynamic accessors which can be dropped either before or after the FGV vi which stores the data. This isn't too bad but doesn't give the simplicity and ease of use I was hoping for..... Any ideas??? Let me know what you think. I've possibly made this far more complicated than it needs to be but its been a bit of fun anyway..... Cheers, Pete Universal FGV.zip
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.