-
Posts
264 -
Joined
-
Last visited
-
Days Won
10
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by bbean
-
-
I have a USB6211 DAQ device I'm using to control a strobe and a stepper motor. The strobe is controlled by ctr 0 (a high pulse fires the strobe). ctr 0 is also jumpered to P0.0 (a digital input) to trigger acquisition of some analog signals. The stepper is controlled by ctr1 and Digital Input P0.1 is used to find a zero position on the stepper index (high is zero).
http://forums.lavag.org/index.php?act=attach&type=post&id=5611
Everything seems to work fine most of the time, but sometimes the USB6211 gets in a weird state where every time the stepper zero input (P0.1) goes high or the ctr1 task for stepping starts, the strobe (ctr 0) fires. This undesirable behavior seems to happen after the user hits the stop/abort button and then restarts the program. Its almost as if there's crosstalk between the P0.1 and P0.0 inputs that gets fed back to the CTR0 output via the jumper. If I send a reset device command via max this behavior stops.
Does anyone know what might be happening?
Do I need an additional pulldown resistor on the ctr0 output to hold it low?
Thanks,
Brian
-
-
QUOTE(Herbert @ Apr 20 2007, 02:43 PM)
I agree. The help for "Set Properties" actually lists the allowed data types, unfortunately the list is wrong. I've filed documentation CARs accordingly. The following data types are allowed as TDMS properties:-
U8, U16, U32, U64
-
I8, I16, I32, I64
-
SGL, DBL, EXT
-
String (alphanumeric, cannot contain null terminator(s))
-
Timestamp
-
Boolean (supported, but there's a bug with booleans in "Get Properties")
-
Variants that contain any of the above types
Any other data type should either break the wire or return a runtime error.
When I added a numeric to the clusters I found it was not reading back properly.
http://forums.lavag.org/index.php?act=attach&type=post&id=5604
I believe this results from the fact that the TDMS Write Key write the value as a string:
http://forums.lavag.org/index.php?act=attach&type=post&id=5606
and try to read it back in using its native datatype.
http://forums.lavag.org/index.php?act=attach&type=post&id=5607
Before I start working on improvements this brings up a few questions.
1) Should we formalize the development in OpenG and start tracking the version changes.
2) Should we store data in the TDMS file in its native datatype (dbl, u32, etc) when possible for compatibility with other software Diadem, etc or should we just store it as a string and convert it back to the data type when we do the read.
-
U8, U16, U32, U64
-
-
QUOTE
Hi BrianI hope you didn't spend your holiday playing with this stuff, there are better things to do :beer:
The holiday was all skiing and beer in Canada. Highly recommend the Banff area for skiing, even in late March.
QUOTE
The idea of the dynamic create being able to choose the correct object based on the persist file is in interesting idea, I quite like it, I'm not sure yet how to correctly implement it.The demos I've put together that implement persistence are proofs of concept at the moment, I think there are better ways of achieving it, I need the time to tinker with some ideas and begin working it into the mechanics of the object. You are right, the persist file path doesn't really belong in the datamembers but probably in the object cluster, but this was the quick fix until I can create a GOOP template that provides it. It would be cool if you would like to participate in this.Sure.
QUOTE
I suppose the direction you take with this depends on the time you have to do your project. If you can tolerate having the persist file path in you data members then go with the architecture I've provided, however if you have the time to tinker then carry on, I don't think you are wasting your time, its just a matter of how much time you have, this stuff is fun after all. In the mean time I'll play with some ideas and post them up for discussion.BTW I posted up a built exe version in 8.2 of the DynamicPersistDemo that you would no doubt be interested in, see the following post.or download the code fromI saw that right after I posted the message. I'll take a look
-
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
-
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.
-
QUOTE(SciWare @ Mar 22 2007, 02:38 AM)
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
-
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.
-
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
-
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
- Multi-user
-
-
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.
-
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
-
We're not zealots, we're spelunkers and archeologists ...
OK Just found a new tool - Google Code Search. I did a search on labview and found this in Perl code:
"
$self->tone(@$_) if ($_->[0] > 0);
usleep($_->[1]*15000);
}
# Now how many square meters of LabView code
# would you need to do this?
}
"
http://www.google.com/codesearch?q=+labvie...ent/SR780.pm#a0
Sometimes I feel like that.
-
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!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
-
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:
-
-
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
-
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
-
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.
-
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:
Regards,
Brian
-
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
-
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
TDMS for big config clusters -- is there a better way?
in Database and File IO
Posted
QUOTE(PJM_labview @ Apr 23 2007, 05:01 PM)
I have already found a need for it. When I store multiple traces (channels) of data with peak detection, I store the cursor list cluster (peaks) to the channel's property. Then I can pull up all the channels and the peaks recorded during data acquisition and plop them on the graph pretty easily using the "TDMS File Viewer.vi" and the TDMS file. Its nice because it keeps everything in one file.
What do you mean by more complex? Do you mean you have to specify the channel and group every time you write a cluster? I was thinking the "channel and group" write/read functionality would be additional VIs not replacements for the default option which would be to write/read everything automatically.
Brian