Jump to content

bbean

Members
  • Posts

    258
  • Joined

  • Last visited

  • Days Won

    10

Posts posted by bbean

  1. QUOTE

    .....however since I used the variant config vi's they initialize all of the data members so I had to call read persist before I set the DataIO object in the Pump object, hence this operation had to be performed even before the object was created, virtuals need the object to be created first.

    Kurt,

    Got back from vacation and am starting to look over everything. Everything works great. After looking at your code I started to feel a little braver and wanted to revisit some of the approaches I tried before I saw your example (probably a bad idea). What I was trying to do with the GoopTemplate Pump Examples was implement the Factory pattern from LV8.2 shown here:

    See http://jabberwocky.outriangle.org/Factory_UsingVIs.zip

    and http://jabberwocky.outriangle.org/Factory_UsingClassRef.zip

    using the GoopTemplate in LV7.1. The motivation as i see it (may be wrong) behind using the Factory pattern is to seperate the Persist Path data member from the pump object because it doesn't seem like persist file path should be a member of the Pump object. Also the factory approach seems like a very flexible means of abstracting the creation of Pumps (or any other objects).

    Attached is half-hearted attempt to implement this pattern. The Pump Save.vi creates a digital pump object with a VISA Data IO member, then saves the object data to the ini file under the objects instance name as a section header. After that, I try to implement the pumpfactory to read the pump data from the file dynamically.

    http://forums.lavag.org/index.php?act=attach&type=post&id=5405

    In the PumpFactory I attempt to determine the pump type by reading the "object type string" from the ini file header and then comparing it to the list of "Pump types" in "Pump Factory". Once the type is determined, I would like to dynamically call the appropriate Pump.Create (as opposed to creating a case statement with the hard coded Pump.*Create objects). I guess I'm stuck here and wonder if I'm wasting my time.

    http://forums.lavag.org/index.php?act=attach&type=post&id=5406

    Thanks for all your help,

    Brian

  2. Thanks Kurt. Its going to take me a while to digest this. Unfortunately (or Fortunately) I'm going on vacation tomorrow for a week. I'll take a look in detail when I get back. I like what I see so far. One question:

    1) Is there any reason you made the Persist Method private? It seems like it would be a candidate for a virtual function call. I realize its called in the virtual method of Destroy.

  3. QUOTE(SciWare @ Mar 22 2007, 02:38 AM)

    Hi bbean

    There are several ways of persisting object data, the super messaging example is a great way for persisting object data where there is an object hierarchy, but its more of an example of super messaging than persisting data. One of the things I really like about ini files is that they are very readable and you can be selective about the attributes that you persist, not every member should be persisted.

    A couple of alternative methods of persisting data would be.

    1) Use the OpenG Variant Configuration File package to write or read your data members, everything will be persisted though. the ini file format is very readable.

    2) Write the data member cluster to an XML file, this is readable to a degree but everything will be persisted.

    3) Cast the the data member cluster to a string and write to a binary file, non readable form unless you know the type of your data member which could change, ie add an attribute and suddenly you cant read the data members. I would avoid this technique, its quick and dirty

    To enable initializing your data members from file simply use one of the above inserted in the create between the default members and the Object.New. The file path to the persist file should be added to the data members so that it is available when you persist the data in the Destroy.

    I'm currently doing up some demo code for you but time hasn't permitted me to get it out today, but stay tuned and I'll pop something up here tomorrow that should help you out.

    Thanks. I use the OpenG Variant package a lot for other projects. I was able to save the Pump.Digital data members to an ini file using the OpenG code. The attached file shows what I have so far. I didn't create the persist method for the DataIO member of the Pump Class because I couldn't determine how the Config File Reads would automatically determine the instance type of the DataIO object from the sections created by the Pump.Persist methods.

    For example, if one pump has a DigitalIO object that is a DataIO.FieldPoint.Digital and another pump has a DataIO.Datasocket.Digital. The "type" key in the "DataIO object" section of the ini file only says "DataIO" not the specific instance type. Also if I have a collection of pumps how do you distinguish them in the INI sections? Do you add the instance name to the section header?

    BTW I was going to post on the sciware forums ( http://sciware.com.au/forums/''>http://sciware.com.au/forums/' target="_blank">http://sciware.com.au/forums/ ), but they seem to be down.

    Thanks for your help.

    Brian

  4. Does anyone have an example of how to persist an Open GOOP object? I looked at Tutorial 8 from from Sciware's Goop Developer Template (http://www.sciware.com.au/goopdeveloper/SciWare%20GOOP%20Developer%20User%20Guide%20and%20Tutorial.pdf) using supermessaging and INI files. But it seems cumbersome to create section/keys for each object. Also I'm worried that the INI format might not be right/fast for more complex objects.

    For instance, say I want to persist a collection of digital pumps (from the examples http://www.sciware.com.au/goopdeveloper/GOOPExamples.zip). I want to be able to save this collection and recall it and its state at a later time. The Collection would be an array of pumps. Each pump object also contains a DataIO object. Each of these objects can be instaniated as a child object. One place I'm getting stuck is reading the file back. How do I know from reading the file which instance of the pump and/or digitalIO objects to create.

    Are there design patterns and file formats that I can use to make this easier?

    P.S. Pardon my use of terminology. Just learning this GOOP stuff.

  5. QUOTE(Phil Duncan @ Mar 21 2007, 01:29 AM)

    Greetings all,

    The remote sites are just that, they would be scattered over hundreds of kilometres (miles) from each other and a central monitoring station. I spoke with a representative from Australia's largest telco who supply modems and cards to access their "Next G" wireless broadband network (HSDPA). I was informed that the minimum requirements for a any card (USB or PCMCIA) that connects to the wireless broadband network is a windows O/S. Compact fieldpoint units run a real-time operating system, so unless some very smart person has already developed labview drivers for these cards that can be included in a real-time application on a PAC I have reached a large high brick wall. :headbang:

    Cheers & Beers

    :thumbup: :beer:

    How bout this:

    3G – UMTS/HSDPA Tri Band Cellular Router

    http://www.kapp.com.au/products/radiotelemetry.asp

    Also, this company has done wireless broadband with GSM and Compact RIO modules.

    http://www.sea-gmbh.com/en/crio/cr1_index_e.php?page=inhalt

    maybe they could provide insight.

    I don't know if you are locked into the "Next G" wireless network, but it seems like there are a lot of products out there for Ethernet to GSM Gateways

  6. I just recently setup an apache server on windows with multiple project subversion/trac. My head is still spinning from the installation. There were a lot of hiccups getting ssl (on apache) working, all the proper python modules for trac installed and working, and creating the svn access list for multiple projects/users. Some of the applications and their dependencies/modules have installers, but most of the work is done in config files and the command line. I must confess that I'm a windows user so it took a while to get used too. It did get frustrating when you found a deep chain of dependencies for the installations that all required python "easy installs"

    Right now I don't know whether to be proud of my accomplishment or go sulk in a corner because my noob skill level with apache/python/trac/ssl/authentication etc. But now to try and answer your questions:

    • Multi-user

    Trac supports multiusers. I choose to utilize authentication via apache to support multiple users in each project. Inside the trac webpage (via the webadmin plugin) you can modify permissions etc for each user.

    • Multi-project

    Trac supports multiproject. You create a different environment for each project. You can then change settings in an ini file to point to different repositories and customize the webpage for the project.

    • Web based

    Yes

    • Open source

    Yes

    • Good performance across distant networks

    Don't know. Just going across internet a few miles

    • Inuative interface

    Seems like it so far if you install the webadmin plugin (the next version of trac will have this built in)

    • Comprehensive reporting functions

    haven't gotten this far yet.

    • Integration with Subversion

    Yes. Browsing of repository on the Trac webpage. Limit access / viewing to certain sections of your repository. I believe the Timeline webpage on Trac updates everytime you commit to Subversion

  7. Your best bet is to write a VI that does a VISA read in a loop with short timeout instead until data has been returned OR another error than timeout is returned OR your long timeout has elapsed and abort that loop through a global when you need to do so. A tiny bit of programming and thinking but an absolutely fail safe solution that depends nor on external code, nor on specific LabVIEW hidden or version dependant features.

    Rolf Kalbermatter

    Thanks for the suggestion. If I implement that option, I now find that the real problem occurs at the VISA Write. It seems like the general timeout value I apply to the VISA session does not apply to the VISA Write VI. I think another thing that might be making this difficult to troubleshoot is that I am using remote VISA calls i.e. visa://ip address/asrl2::instr. I'll have to see if the same problem occurs when I am on the local machine.

  8. LabVIEW 7.1

    I have a VISA read operation that requires a long timeout (5000ms). When the user wants to exit the application I want to abort the VISA read immediately. I have tried Closing the VISA session in a parallel loop. I have tried setting the timeout property to 0 in a parallel loop. Neither of these worked. :headbang:

    I looked through the NI VISA programming reference manual and notice a command called viTerminate. snip: "Requests a VISA session to terminate normal execution of an asynchronous operation.". Is this what I need to execute and if so where is it on the LabVIEW pallete? Or is there a simple way I am missing?

    Thanks in advance

  9. That comment is not as bad as the ones ppl found in windows source code :

    http://www.kuro5hin.org/story/2004/2/15/71552/7795

    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    * !!!!!!!IF YOU CHANGE TABS TO SPACES, YOU WILL BE KILLED!!!!!!!

    * !!!!!!!!!!!!!!DOING SO F*&^s THE BUILD PROCESS!!!!!!!!!!!!!!!!

    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

  10. Also, there's probably little reason to use multiple repositories; you can do:

    <root>/Project1/trunk

    <root>/Project1/branches

    <root>/Project1/tags

    <root>/Project2/trunk

    <root>/Project2/branches

    <root>/Project2/tags

    <root>/Utilities/trunk

    <root>/Utilities/branches

    <root>/Utilities/tags

    ...all in the same repository. You can also use externals within the same repository in order to keep everything in sync (I do this for some simulation code I run in Igor.)

    Some questions about SVN and LabVIEW. How do ppl deal with multiple LabVIEW versions in SVN? or more specifically what subversion repository structure do ppl use for multiple LabVIEW versions?

    Is it like this:

    <root>/Project1/LabVIEW 7.1/trunk

    <root>/Project1/LabVIEW 7.1/branches

    <root>/Project1/LabVIEW 7.1/tags

    <root>/Project1/LabVIEW 8.0/trunk

    <root>/Project1/LabVIEW 8.0/branches

    <root>/Project1/LabVIEW 8.0/tags

    <root>/Project2/LabVIEW 7.1/trunk

    <root>/Project2/LabVIEW 7.1/branches

    <root>/Project2/LabVIEW 7.1/tags

    <root>/Project2/LabVIEW 8.0/trunk

    <root>/Project2/LabVIEW 8.0/branches

    <root>/Project2/LabVIEW 8.0/tags

    <root>/Utilities/LabVIEW 7.1/trunk

    <root>/Utilities/LabVIEW 7.1/branches

    <root>/Utilities/LabVIEW 7.1/tags

    <root>/Utilities/LabVIEW 8.0/trunk

    <root>/Utilities/LabVIEW 8.0/branches

    <root>/Utilities/LabVIEW 8.0/tags

    Or Like this:

    <root>LabVIEW 7.1/Project1/trunk

    <root>LabVIEW 7.1/Project1/branches

    <root>LabVIEW 7.1/Project1/tags

    <root>LabVIEW 7.1/Project2/trunk

    <root>LabVIEW 7.1/Project2/branches

    <root>LabVIEW 7.1/Project2/tags

    <root>LabVIEW 7.1/Utilities/trunk

    <root>LabVIEW 7.1/Utilities/branches

    <root>LabVIEW 7.1/Utilities/tags

    <root>LabVIEW 8.0/Project1/trunk

    <root>LabVIEW 8.0/Project1/branches

    <root>LabVIEW 8.0/Project1/tags

    <root>LabVIEW 8.0/Project2/trunk

    <root>LabVIEW 8.0/Project2/branches

    <root>LabVIEW 8.0/Project2/tags

    <root>LabVIEW 8.0/Utilities/trunk

    <root>LabVIEW 8.0/Utilities/branches

    <root>LabVIEW 8.0/Utilities/tags

    Or neither :question:

    Branch/Tag/Trunk directories

    When you do a checkout to the local machine do you prefer to see the \branch, \tags, \trunk directories from the reository on the local machine?

    Utilities

    Do you checkout your "utilities" directly to the appropriate versions user.lib? Or do you use externals and checkout everything (project vis and utilities via externals) to a local project directory?

    Sorry for all the questions, just trying to figure out what works best for people? :beer:

  11. While there is much love for Tortoise SVN for managing Subversion projects, you can try an SVN plugin for Windows made by PushOk that lets you work with your repositories (doing basic check in/out operations) from within LabVIEW 8.x.

    Do you know how much a Pushok license costs? I don't want to have to fill out all that info on the website just to find out.

    Brian

  12. You can do multiple repositories, importing a shared "utilities" repository as an "external". Unfortunately, I don't think there's an interface to do so in TortoiseSVN; I handle my externals by ssh-ing into a unix box and using the svn cli tool:

    % svn propedit svn:externals <target directory>

    FYI. You can handle externals in TortoiseSVN by right clicking on the directory, selecting properties, and then the Subversion Tab

    post-549-1158706740.jpg?width=400

  13. The reason you do not see them is because you do not have the scripting features enabled. go to the scripting forum here on lava and put the features in your labview ini folder and then restart labview and you will see them.

    Got it thanks. I had the original ini entry but I forgot the SuperSecretPrivateSpecialStuff=True. That seemed to do the trick.

  14. Hello bbean,

    what code are you using?

    LV 8.0

    BTW i found an option in the context menu:

    This will add a context menu item on the subpanel, where you can open the BD, maybe something for you?

    I knew I was missing something. This should work for me. Thank you.

    And this code was succesfull for me:

    this is the code from the subpanel vi, it opens the BD if I click on the (running! sub panel VI) boolean

    Still can't figure out how you did this. These are the options I have for VI Properties:

    post-549-1154036744.jpg?width=400

    Regards,

    Brian

  15. Am I missing something simple or is there no easy way to open a subpanel VI block diagram window while it is loaded in a subpanel ?

    :headbang:

    I would like one of two things:

    1) Open only the block diagram window of the subpanel VI before I run the toplevel VI.

    2) Put a button on the top level VI's user interface that allows me to open the block diagram of the subpanel VI I have in the subpanel so I can debug the VI's code while it is loaded in the subpanel.

    Right now it seems like I have to have the subpanel VI open before I run the top level VI if I want to debug the code. Even then, the subpanel VI window does not load in the subpanel of the top level VI.

    I looked at the VI properties and methods but didn't see anything for Block Diagram except "get image"

    Has anyone run into this before?

    P.S.

    Using LabVIEW 8

    post-549-1154031636.jpg?width=400

  16. I saw your cross post to the NI forum and am responding here to let NI reply.

    1) I believe the VISA driver has ben updated recently (to handl esomething with events). Have you tried the latest and greatest version (this week)?

    2) THe are more than one "enable termination character" property. Check the "out of the box" version of the "Serail Port Init" that ships with LV.

    I have nothing more to offer at this time.

    Ben

    Thanks for taking a look at this. I found out the problem. I was missing a portion of the "Header message" when I sent the commands to the controller. The documentation doesn't really explain this header until you get into the examples. I missed it in my rush to get things done. Sorry for the false alarm about events and flow control.

    Brian

  17. First, has anyone developed a driver to communicate via the serial port with a Digi-sense 68900-11 temperature controller? I've checked ni instrument driver network, google, and the company's website with no luck. I think its manufactured by a company called Eutech.

    Since I couldn't find a driver, I wrote a quick Labview interface with some simple commands to communicate with the instrument but couldn't get anywhere setting up the serial communication according to the serial communciation specification (see attached). I kept getting timeout's and was not able to read or write any data to the controller.

    The basic settings are 9600,8,n,1, XON/XOFF (w/ XON=11 hex and XOFF = 13 hex)

    So then I setup Portmon to watch the OEM's software application (which works fine). The OEM applicaiton seems to have a different setting for the "Shake:80" serial setting in Portmon. I've tried a bunch of different handshake settings using the VISA Serial Setup vi to try and match the OEM software to no avail. Also the OEM software seems to enable a bunch of Serial Events. Some of these I can enable and some I can't, but when I enable the events the computer justs grinds to a halt. Do I have to enable and handle the Serial Events or can I ignore them?

    So I turn to you guys for advice. Attached is my code, the comm spec, and port mon snapshot's.

    Download File:post-549-1153680070.llb

    post-549-1153680098.jpg?width=400

    post-549-1153680126.jpg?width=400

    Download File:post-549-1153680142.txt

  18. I don't understand what is going into Table 2 - plot colors and point styles, stuff like that?

    I like snooper's idea, but if you don't need to query limited ranges of data, maybe the best thing would be to store the X values and Y values as "blobs". Then you could put multiple plots' and graphs' worth of data into one table, as seems to be your intention, and only have a few rows. I'm pretty much a DB ignoramus so take this suggestion with a grain of salt.

    In my limited experience of transferring data to/from LabView and DB, there is no problem dealing with a few thousands of rows in a table.

    Table 2 is just a link between the Graphs Table and the actual Plot Data in the Plot Data Table. Really you only need two columns for Plot ID and GraphID, the extra stuff is if you want to store information specific to the plot..like a color so that you could load the configuration into your graph property node when you query the db for a Graph.

    I have been using a similar technique on an application recently and it hasn't had any problems yet, but the Plot Data table is still relatively small ...about a million points. I can query and return a 150000 pt plot in about 5 secs across the LAN. Not too bad. We'll see how it does as the DB grows. I'll let everybody know if there's an issue.

  19. Using the spectrogram function in Labview, I'm getting a weird cutoff in my graph. I'm plotting frequency v time, and on the frequency side, the graph goes up to a certain threshold, and then nothing above that threshold, even though I'm certain that I'm recording frequencies higher than that.

    Is there any known problem or limitations with the NI_gmath.lvlib:STFT Spectrogram.vi function? Any suggestions? Thanks!

    Jennings

    Are you using a daq card and DAQmx to sample the data?

    The only time I have seen this is when I set the sample freq. too low by accident. I've seen NI's Express VIs automatically cutoff anything above the Nyquist freq (which makes sense)

  20. there, too, but I think the best exampe for this technique is the MAX?

    BTW: the splitter bar functionality was used in the max log before it became availiable for the public ...

    The VIs itself are part of a software, I wrote for a customer, and I had to sign a non disclosure agreement, to get the job, so I'd say yes and I am not allowed to post any VIs. But the technique is not proprietary. Id would take a while, but I could try to explain, if you are interested?

    I'm familiar with the tree control so I guess what I'm interested in is:

    1) What DB tools did you use? labsql, ni db toolkit, or custom,

    2) Do your VIs automatically traverse the database to build the tree?

    3) If it automatically traverses what technique do you use?

    thanks.

  21. It's not really diffucult to implement that. The actions are (of course) in the state-machine of the "framework VI" and the subpanel writes the appropriate actions into the state-Q of the framework VI. I was surprised myself how easy it was. I'm using subpanels very often, I only develop small applications without them, because I don't like lots of popup windows.

    thank you. btw: the icons should be on your disk, too. just start a search for *.ico files, and you'll probably find them (these are mostly default windows icons ...). If you need a tool, to quickly set the "user icons" of the tree, let me know, I have a small tool. It's not proximate as pretty as the screenshots above, but will provide you an array if images, which you can use to set the custom icons.

    Slightly OT

    Forgot to ask about your DB and tree control. Are the VIs you used to populate the tree from the DB proprietary? If not I'd be interested in taking a peek. I guess I'd have to brush up on my ?German? though.

    B

×
×
  • Create New...

Important Information

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