Re: i am caught in bizarre situation my labview programee takes...
You might try putting a 50 msec delay somewhere in your program loop to give the CPU time to perform other tasks. With no delays in a LabVIEW program, it *will* hog all the CPU time. Rob
Re: my parallel port cannot work on win2000 and new pc
Some of the newer PCs (some DELLs included) have the parallel port disabled to free up some resources for other things in the system. Check in the BIOS (during boot) and ensure that the parallel port is enabled. Can you check the port with a parallel printer (or some other device)? Rob
Re: LV Web server remote access failure
We have the same problem with the local cable company. We have a small network on a cable modem and people can not connect into our network from outside. When I asked the cable company about it, they told me that their firewall prevents that, but if I wanted to purchase the business package then they would open the firewall for others to connect to our system. You really need to talk to your provider to see if they will allow this. Tell them that you are testing to see whether it would be worthwhile to set up a "business system". Rob
Re: Is there a way to create a multi-state button or have a pict ring behave like boolean?
I just had a thought (don't everyone cringe at once)... You could change the text on the button programmatically using property nodes and then when the button was pressed, read the button text to see which "state" it was in. A little clunky but it should work. There are other, better ways of doing this, but I think that this is a "workable" solution. By building a typedef list of texts for the button, you could change it quite easily. I may try this just to see how it works. Rob
Re: Save for version 5.0 with Labview 7.0
Yes, you can load more than one version. The problem comes with things like MAX and NI-DAQ. These only allow one version to be loaded at a time. We have a machine here with LV 5.1, 6.0, 6.1 & 7.0 on it. They all still work. Rob
Re: priority in events
We use a queue to queue up states for a seperate state machine. The event handler only adds states to the queue. I know that it sounds a little awkward, but it has many advantages since you can take things out of the queue or put things in the front of the queue. When it come right down to it, you can also interrupt what's happening in the state machine. This might be an architecture that you could use to re-order how things happen. Rob
Re: Ring Control displaying digital display when cleared on exit
Interesting that we use the (-1) case in our LV 7.0 programs. So I did a little digging. The default for menu rings is to be a U16 in which case what you're mentioning makes a lot of sense (it's an unsigned number after all). Click on the terminal in the block diagram and make it I16 and the (-1) now works. It's probably the easiest fix to just change them all to I16's (if you're using them in multiple sub-VI's you *did* make them typedef's so you only have to make one change, didn't you?). Rob
Re: VISA Performance
Having run LabVIEW on a variety of systems, I've found that it's not that unusual to find a program run faster on an NT system than on other systems. I haven't compared WIN2000 with NT yet, but WIN2000 does run faster than on XP. NT has *MUCH* better multitasking than Win98, so this explains quite a bit. Those background tasks don't pull you down as badly. And, yes, there are always background tasks (such as updating the clock). Rob
Re: I am looking for a indicator like a FLASH LIGH, just show my sequencies moving on.
LabVIEW 6.1 and up allow you to put animated GIF files on the panel and on the diagram (we have a picture of a burning computer on one diagram :). You can put an animated GIF in a picture control and hide the control until you want people to see it. We are using an animated hourglass to show that the program is working. Just a quick and dirty thought. Rob
Re: I am looking for a indicator like a FLASH LIGH, just show my sequencies moving on.
Oh I agree with that. Like it said, this is just the quick and dirty way of doing it. You have to lock up the computer to stop the animation (something which we've managed to do a couple of times). A real progress indicator is much better. Instead of just saying "Please Wait" on screen you can also add an animated GIF. I usually prefer functional programs over "cute" programs, but then, we don't program for ourselves here, but for customers. Rob
Re: Sequence tunnel error
I think that we're going to have to look at the code for this one. Can you post it or as much of it as we need to see what's happening? I can't seem to reproduce the problem here with the information that you gave us. Rob
Re: i created boolean references in my main vi block diagram and...
Does the reference in the subVI say "Bool Refnum" on it or is it a "Control Refnum"? You also might try right clicking on the refnum in the subVI and selecting "Include Data Type". This will turn on or off the strictly typed reference property. That's where I ran into problems. Rob
Re: how to test for cold soldering?
One of the better tests is temperature shock. Move the sample from -40C to +40C and back again with enough time in between the moves for the equipment to reach that temperature. If there are cold solder joints then there is a very high probability that the solder will actually break the connection. I used to do this testing for a living and have seen more than a few failures this way. Even if contact is not lost through the solder connection, visual inspection becomes much easier as the bad connection will be more obvious. Using red or blue light filters as you inspect the board can also be quite helpful. Rob
Re: Run-time licenses
I remember the 5.1 licensing. It used to be that you could distribute an EXE that you made with LV5.1 to 6 (I remember the number 6) other computers, but you could distribute the EXE to as many computers as you had NI cards in (and only NI DAQ, GPIB, etc. cards - no other vendors). We thought that was pretty bad. You had to purchase the right to distribute wider. LV7.0 (and 6.0 and 6.1) does not have that limitation. You can distribute your EXE files as far as you want. Much more reasonable policy. You just can not distribute LabVIEW itself (of course). But since the LabVIEW run-time engine is free, that's not a problem. Rob
Re: setting a single button to do a task in different loops
This is usually not too much of a problem. You can create a local variable from the button and use that to read in one of the loops. You will not be able to use the mechanical action "Latch when..." for the button, but have to change it to "Switch when...". This also means that one of the loops will probably have to turn the button off again. It's a little more programming, but it works. For another method you could use a notifier (or an occurance, but I'm not fond of those) for one loop to "tell" the other loop that the button has been pressed. Rob
Re: Enums and loops
On your VI diagram, right click on the enum control and select Create->Property Node, then select the property "Strings[]". This will return an array of all the choices in the enum. You can then feed this array to a For loop and inside that put a case statement for each possible choice (if each choice does something different). Inside the For loop, you can program whatever you want, actually. Is this more what you're looking for? Rob
Re: Run-time licenses
We had meetings about this. It was in the package that we got that was marked "Only for distribution in Canada." Maybe their lawyer were working overtime figuring what the licensing should be for different countries - I don't know. But we definitely had a couple of meetings to discuss this. I don't have that package anymore, but I'll see what I can find. Rob
Re: I pull fiftyfour bytes of data from MicroProcessor's EEPROM...
I would check the instrument manual to see if there is a limit on the maximum number of bytes that it will send in one packet. Still try getting it to send 255 bytes and see if that works. If it does, then try 256 bytes to see if the limit is there (a one-byte counter for number of bytes sent). If so, then you may have to get the instrument to send data in multiple packets and put the data back together in your program. Rob
Re: Capture right mouse click in image
I LabVIEW 6.1 and up, you can use the event structure to capture mouse clicks. On the left side of the event structure is a nice little box that includes an input called "Button" this input is the button number that was pressed. You can catch all clicks with whatever button this way and perform various operations based on the button. This is probably the easiest way to check. Rob
Re: What's the best way to store test parameters for future use?
Personally, I would store the parameters in an .ini file. In the File VIs are the Configuration File VIs and they are really good for reading sections and keys. You could have one large .ini file with a section for each instrument or you could create an .ini file for each instrument. Either way, you can save your parameters in the keys and get them back later. I lean towards having fewer .ini files and keeping things a little cleaner in the file structure. Rob
Re: red square border prevents continuous vi execution
The red square border is indeed a breakpoint. Just select the breakpoint tool and point to some blank space inside the diagram. If the cursor is an empty (not filled in) stop sign then there IS a breakpoint there. Just click and the red border should go away and the cursor change to a filled stop sign. Give it a try and see if there is a breakpoint there. Rob
Re: Errormessage, please help explain
The most likely cause of that error is calling a function in a DLL with the incorrect number of parameters. Too many or too few parameters can mess things up quite well (trust me on this one - been there, done that). Usually, no damage is done. Check the function in your DLL and reproduce the parameter structure EXACTLY. Rob
Re: Dialog color that matches tab in the XP theme too
We got away from using system colours on all of our GUIs for just this reason. Explicitly stated colours allow us to have a consistent looking GUI on whatever OS. Might be an idea so that whatever scheme the OS producers come up with, the GUI will still be usable. BTW, we had some comments in the code with system colurs and they disappeared against the background on Windoze XP. Rob
Re: I need to defend Labview from some co-workers previous experience.
Five years ago that should have been LabVIEW 4 or 5. But then, as we've seen here, some people keep versions around forever. I have always worked with the professional packages, so I've always had access to compilers for LabVIEW. Where I work now, we use Perforce for revision control. It works great. I've also used Visual Source Safe and I'll stick to Perforce, thanks. You can even set the client to automatically sign out the code if you change to edit mode on the diagram. AS others have said - LabVIEW excels at equipment connectivity. An example from my past: a C programmer had spent 2.5 days building a terminal type of program to talk to our equipment. He gave me the DLL that he was using for communications and watched as I built the same program in LabVIEW and completed in 15 minutes. His comment was that he was probably going to be relegated to supporting the old code while I made the new code and for the most part he was right. Rob
Re: Binary or bit handling functions?
That's what boolean functions are. On/Off, 1/0, True/False - all the same thing. There are even conversion functions like number to boolean array. Also on the Advanced -> Data Manipulation palette are rotate and shift functions. If you have an I32/16/8 or U32/16/8 control or indicator, you can select binary in the Format & Precision menu. What more do you want for binary functions? Rob
Re: hide front panel when opened
One thing that you could do is to change the Windows Appearance property to NOT open front panel when called. You can then have your main VI (VI_B) open the panel for VI_A as before, but it will not start with the panel open. If you are creating an executable, go to the VI Settings tab page and click on the line with VI_A and then Edit Settings. Turn OFF the Remove Panel property. This should work for you (I've done similar already anyway). Rob
Re: How to reset the main front panel?
Another way to handle this is to have any subVIs that you want to close watch a notifier and close if the notifier tells them to. Then in your main VI code open a reference to the front panel (use the Current VI's Path function and connect it to the VI Path input of Open VI Reference), connect the reference from the Open to an Invoke Node and select the method: Reinitialize All to Default. This will change everything on the front panel to whatever the default was the last time that you saved the VI. Oh and don't forget to close your reference once you're done with it. Opening references without closing just chews up memory. Rob
Re: how to sum all bytes in array and remove carry/overflow ?
If your array is an array of U8 type numerics, then all you have to do is sum the elements. This will return a U8. No carries. Sounds like what you're looking for. Rob
Re: How to close certain subvi front panel?
One of the things that you might try is that the property node for front panels includes the Front Panel Open property that you can READ to see if the panel is open before you try to close it. It's a boolean so easy to build a case structure after it. Hope this helps. Rob
Re: How to close certain subvi front panel?
How does your VI decide which subVI to close when you hit the button on the front panel? Is it by name? If so, then that's all you need to open a reference to the subVI. There is a property node that will list all VIs in memory, but if you have a large program, this could be a huge list. Windows utils has a "Get Windows Task List" VI, but it doesn't list VIs (since they are not individual tasks - they list under their parent). So the best that I could come up with right now is to set up a global variable array of strings in which any VI that opens its front panel lists its name (or the calling VI lists its name) and then you have a list of all open front panels to work with. A bit kludgy, but should run fairly fast. Rob
Re: can I use my usb port by itself as an DO/DI?
Having done serial and parallel port control a few times, here are some of the things that I've found: Most serial and parallel ports send output as pulses. So if you want to "turn a line on" you have to build some hardware to latch that state (I built a simple circuit with line 0 of my parallel port as the clock input on a latch, so everytime line 0 pulsed, the values on the other lines were latched). Some parallel ports can hold line states, but not all parellel port hardware supports this. Reading input is easier. Serial and ethernet are pulse oriented even more than parallel ports are. Since bytes are sent 1 bit at a time, more external hardware is needed to latch or read multiple lines. 100baseT ethernet uses 2 wires for input and the input is differential, most chip sets (all that I know of, but I can't speak for ALL of them) require these lines to mirror each other and can not read each of these wires seperately. The read on them is basically edge triggered based on divergent changes (pulses). Output is differential as well. I can't speak about USB since I haven't worked with it much. But then it is a Serial Port isn't it? Should send data out in a pulse train. Parallel port is easiest for "hardwareless" DIO. Hope this answers some of your questions. Rob
Re: How can I communicate betwen parallel asynchronous VIs?
Yes, unfortunately, event structures do not notice data changes when you use the VI server like this (only when you manually change the control - Doh). So that idea is out. It might be possible to build a parallel loop in the subVI that does nothing except watch for the button to be pressed and can then do what's needed to shutdown the subVI. A little awkward but functional. I take it that you don't want to use the "Abort VI" method from the Invoke nodes. That would be "instant", but just ends the VI running - no orderly shutdown (if you need that). Well, have fun with it and let us know what you settle on for a method. Rob
Re: How can I obtain a reference to a global variable?
Gee, thanks folks. I know that it's a kind of messy way to do something like that, but it works (even if it takes a bunch of clock cycles). For myself, in the long run I'd probably use a functional global. I thought about it afterwards and wasn't sure that I'd put the example together correctly. I tossed it together in the last couple of minutes before leaving for a funeral. I must use LabVIEW too much since I thought about this example a couple of times during the service. I wonder if other people have LabVIEW thoughts while supposedly doing other things. Should we set up a poll? Rob
Re: Defining SubVI!
There is another way to put a subVI into a VI as well. Have the subVI on your screen (with the icon visible - not the connector pane) and the VI that you want to put it into. Then click and drag the icon for the subVI and drop it onto the diagram of the VI you want it in. I do this all the time. Create a subVI (don't forget to save it), drag it in and done. Rob
Re: Serial port Write then Read issue
Question: did you check your serial port setup to make sure that local echo was turned off? I see this kind of thing in my machine when I have local echo turned on. It could be turned on in the LabVIEW serial port setup or in the Windoze setup. Rob
Re: Serial communication using serial compatibility VIs does not return correct bytes at Bytes at Serial Port vi
A note that some PDAs (as we're finding here) have a local echo of everything that you send to the serial port. You may have to parse your input to remove the sent command and then read again to get any new input. A pain and it doesn't happen with all PDAs, so if you're only working with one type, you shouldn't have too much difficulty. Rob
Re: Serial port Write then Read issue
Depending on the driver in use - there may be a setting in the hardware settings/device manager in Windoze control panel. My system allows me to turn on local echo through the driver in the device manager. Annoying since my program does that function automatically. Rob
Re: output to parallel port using labview
Depending on the parallel port and the driver, the output would only be a momentary change in the output. Parallel ports were designed for sending data not latching and holding a data value. Can you put an oscilloscope on the port and see what the data looks like? Rob
Re: output to parallel port using labview
Depending on the parallel port and the driver, the output would only be a momentary change in the output. Parallel ports were designed for sending data not latching and holding a data value. Can you put an oscilloscope on the port and see what the data looks like? Rob
Re: serial communication problem in Labview7.0
Go into MAX and see what versions of NI-VISA and NI-SERIAL you are running. We have had lots of problems matching up LabVIEW and the correct versions of these (especially with RT). LV7 has some problems with older versions of VISA and Serial and LV6.1 has problems with newer versions of them. And once you load the newer versions, you can't go back again. Even uninstalling the new versions and then installing the old versions doesn't work. Rob
Re: executable problem
Just a guess, but... One of the biggest problems with building executables is the path to other VIs. In the development environment, an example path might be C:\this path\my vi.vi While in the executable, the path changes to: C:\this path\executable.exe\my vi.vi I'm sure you can see the problems this can cause is the program does not take this into consideration. I ran into this a while ago. This almost sounds like that type of problem. Rob
Re: Ring control behaviour
Pop-up on the ring control and look at the Representation. You'll notice that in some versions of LabVIEW it's an I16 and in others it's a U16. You can change the representation to an I16 and then -1 is a valid number for the ring (instead of just a wrap-around). And, no, I don't know why they changed the default. Rob
Re: Trying to synchronize switching times VERY precisely
The Windoze technical info states that they do not guarantee timing better than 100ms with the system clock. You're right, that generally it's much better than that, but I have seen pauses in my VIs that vary up to 25ms (using a take time before the loop and then check time after the loop). My old Windoze 98 machine varied by as much as 75ms. Yes, NT and XP are better for timing, but there are still no promises. If it's really critical, use hardware (like you said). Rob