Jump to content

ShaunR

Members
  • Posts

    4,942
  • Joined

  • Days Won

    308

Posts posted by ShaunR

  1. Hi, I want to create an loop that can be controlled by buttons - it can be started, paused and stopped. I have found that this could be done with a help of Event Structure. The example (a counter) is below. Can you help me to run counting when it is started? Thanks

    You can download it here: http://www.2shared.c...d2a/events.html (sorry, the file attachement failed)

    First you will need to allow the time-out case to execute by wiring a value (say 100ms) to the blue icon in the top left hand corner. You will then have to use the state of the "Running" boolean to decide whether to increment the counter or not. You can use 2 shift rgisters (one for the state and once for the count).

    This is thesort of thing you will want to use for the counter.

  2. Hi Friends,

    Recently i bought a PC which is having only one PCI slot. Others are PCExpress slots.

    But i want to use few PCI compatible NI hardware same time.

    Is there any hardware available in tha market like a adopter which can give more PCI Slots for my computer?

    otherwise any idea how to convert PCExpress slot to PCI slot?

    Thanks.

    Regards,

    Jai

    NI also do PCIe cards.

  3. Hi yall... So I may have to do this in order to get a 0-5V analog out signal up to the 0-10 V input signal required by a variable frequency drive. I was thinking of doing so by means of an op-amp configured to work as a non-inverting amplifier to increase voltage 2X, then put this through a unity-gain "power buffer" just to make sure the signal gets to were it needs to go (over long wires) without a whole lot of noise and without potentially messing up the op-amp. Should /shouldn't I do this? Any advice? (No, I can't just buy a daq card with 0-10 V output. Cmon, that would be too easy...)

    Regards,

    Mark Garnett

    Sounds good to me. I would suggest darlingtons on the output if current is required.

  4. Yeah, that works. Misunderstanding on my part on how this VI works. I expected to see to binary data in the content output which I could dump to a binary file and a TRUE on the success output even if I didn't wire in a file. Then I tried wiring in a path to save the file but not a complete path+filename assuming it would use the same name. Even with a complete path+filename I still see no content and success=FALSE even though the file is saving correctly. I can live with that.

    FWIW, this 3rd party http client does behave a lot more like I expected. I'll use the toolkit solution anyway, to minimize dependencies.

    Thanks all.

    Will Peterson

    I agree. It has some unintuitive behaviour. It also has a couple of bugs. There's also MGI which is based on the WinInet.

  5. Many moons ago, I had a vi that was basically a wrapper around the write to spreadsheet.vi.

    It was for a data logger, and since the customer didn't really know what data he wanted saved (and kept changing his mind); I wrote a fairly simple vi that read the header (first row) and compared it to the current header to be saved.

    It would look at the header and, if a column was different, would insert a new column in the existing file (i.e upgrade it). If the headers were the same, it would just append the data. Old data therefore had no entry in this new column, but the new data would, but both the old and new would still be in-line with the headers.

    One caveat with this was that you could not rename headers, but that wasn't a problem in my case.

  6. Just for simplicity, I would suggest a TCPIP packet thats sent when your global changes. 2 seconds to add and has the advantage that you don't necessarily need labview on the remote machine (a C++, Delphi, VB app for instance). I prefer TCPIP over UDP since it is far more reliable, although it is not connectionless (i.e you need a target IP unlike UDP broadcast). Once you start down this route, you will quickly find that you want more and more information and it is very scalable and easy to implement :)

  7. FWIW, I'm in the midst of going back and forth with NI customer support just trying to get LabVIEW 2009 activated. This is on a laptop with a couple other versions of LV installed. I got it to activate just fine on a desktop (both computers running XP). But what is interesting is that NI keeps asking me if I have a desktop or laptop, as if this makes a difference for some reason. It sounds like others might be having problems with a laptop installation, also. No solutions, just an observation...

    (BTW, NI support has been very proactive about helping me with this.)

    Cat

    FWIW????

    The Vista x32 installation I tried above was on a Acer Core Duo Laptop. It's probably got more to do with multiple installations. I always have problems with activation since I have to do them manually and (for me) its not worth the aggro having multiple installations.

  8. Well, for that you have 4-wire on the RS-485 side, and while real bidirectional transfer over the USB bus is obviously not possible, the USB bus should, with the right driver, be fast enough to give to the system the impression that it is indeed bidirectional. I haven't used bidirectional communication where the timing was so critical that quasi-bidirectional operation would have caused trouble. IMHO such a system could never work unless all involved parties are 100% real 4 wire devices and their firmware is exactly the same. But that would be highly useless, unless you want to create a protected, private, proprietary communication network.

    Rolf Kalbermatter

    I think you are still confusing Bi-directional with Full Duplex.

    Take for example the Micro-Epsilon Micrometers and 2D/3D Profilers (just an example, since I used them recently). They can operate by "streaming" data back to the Master (important for high speed acquisition). If this were to be used in a half-duplex manner, then once switched into this mode, you would not be able to control the device since the device is continuously transmitting. However, with full duplex you can.

    In another scenario, we have 1MBPs full duplex RS485 digital IO boards. The protocol is a command-response type which is appropriate for half-duplex operation since the devices don't start to transmit until a full message has been received. However, since we have upto 10 of these on a bus, most of the time, the RX line is saturated with messages. We can decide to ignore RX messages if they are a bit stale (since the devices must use hold-off and wait untill the line becomes free due to another device transmitting). But we cannot allow the device not to operate on commands immediately via the TX line.

    Devices such as these are quite common. And "True" full duplex devices actually start constructing the response on the RX line before the entire TX message has been received.

  9. In MAX, opening the item "software", we can get the version for all the NI drivers installed on the computer.

    How can we get that from LabVIEW?

    Mainly I'd like to read versions for the following :

    - NI-DAQmx

    - NI-Vision

    - NI-IMAQ

    - NI-IMAQdx

    - MAX

    Anyone knows how MAX populates the "software" tree item?

    Don't know how MAX does it, but all the NI product versions are available in the regsitry under

    HKEY_LOCAL_MACHINE\Software\National Instruments\XXX\CurrentVersion

    where XXX is the package.

    • Like 1
  10. Unfortunately this only returns NULL as serial number on my XP SP3 system, independent of the log in I use. And I have tinkered quite a bit with IOCTL_STORAGE_QUERY_PROPERTY myself but it just doesn't seem to work on my machine and with that harddrive, except when using directly SMART, but for that I need to open Physicaldrive0 with READ and WRITE access and that fails without admin rights.

    Rolf Kalbermatter

    Well. Your drive also seems resistant to WMI as well :o The pervious DLL used 3 methods, the final one being querying the WMI database.

    Hmmm. Digging deeper........

  11. Seems only solution for me is to get a XP licence and make a VM and install Labview 2009 under that. So far no more suggestion from NI that have helped. I have reinstalled 8.6 and it works.

    I've just installed LV2009 on Vista Ultimate x32 to see if I get the same problems. I didn't and it is working fine. Are you sure you are installing the 32 bit version of LV 2009 and not the 64 bit version? I didn't try the x64 to see if the installer complains.

  12. I haven't played with the BIOS serial numbers yet. I did some tests with my OpenG port IO functions to read directly the physical memory to get to the BIOS information. But this requires a kernel driver that you can only install with admin rights (and elevated admin rights in Vista and higher) and most likely loading that kernel driver is also a Windows privileged operation, just as opening the PhysicalDrive.

    I was able to read various BIOS information in that way and the BIOS serial number was also part of it, but I was of course logged in as admin.

    Rolf Kalbermatter

    Indeed. Actually, it is worse than that. The restriction isn't so much Admin rights, its the "Integrity Level". For example, the elegant way of reading the bios is to use ZwOpenSection or NTOpenSection. However, those functions have an "IL" of High and Admin is only granted "Medium". Its all got very complicated in Vista.

    But not to be daunted, and since you seem to have one of these problematic drives can you try this one?

  13. I'm trying to interface to a document repository (Omnify)

    I can't access the repository directly, but I can give an ActiveX object part numbers and revisions and get back from it an http address in the form:

    http://SERVER/Omnify...le=FILENAME.pdf

    which I can put in Firefox or IE and get a pop-up window to save the attached file. I'd like that to be automatic.

    Neither of the obvious tools packaged with the LV internet kit work ('URL Get Document', 'URL Get HTTP Document').

    After a bit of thought that's kind of obvious. Both 'URL Get Document' and 'URL Get HTTP Document' are looking for files, not an application/octet-stream.

    Any ideas?

    The GetDocument only checks whether the type in the header is text or not. If it is text, it saves it as an ascii file. If it isn't, it saves it as a binary file. If you don't wire a path to the file terminal, it will not save anything (and won't prompt you for a filename).

  14. Dear all,

    I need to record subject's neuromusclar activity (by surface electrodes) during he is walking on a TREADMILL. The treadmill create 180mv pk-pk noise; and the muscle activity is ~60uV. After the noise + signal passing through pre-amp, and 2nd order bandpass filters, the noise signal is dominant . Any idea how to overcome the problem??? I did try to put a little metal shield which is ground on the electrodes, but it did not help

    60uv is not much to play with and I'm afraid no amount of processing or filtering is going to help you. You have to try and identifiy where the different components of the noise are being injected (sensor wires make good arials, but a succeptable amplifier won't help either) The only thing you can do is try to reduce the noise and many medical systems utilise the following.

    1. Shielded sensor wires.

    2, Short sensor wires. Make them as short as possible by placing the amplifier as close to the sensor heads as possible.

    3. Battery supply. This not only allows 2, but also means that your supply wires don't pick up noise.

    4. Put the amplifier in a sheilded box.

  15. You can actually do that with the Windows Message Queue example on the NI side. Since it normally hooks the VI window there are events that it never will see, but hooking the application window should be possible too, albeit a bit more troublesome. (and if you mess up that hook you can hose LabVIEW pretty badly :cool:, as I know from various projects where I went that path).

    Rolf Kalbermatter

    Not quite what I was after. I want to be able to register and use an Event structure :)

    I played around with an active X dll that enabled me to register for events using the register callback node which was rather successful, but as I don't allow active X....I binned it :P. I was hoping to see the events overhauled with LV2009, but severely disapointed when it was only cosmetics.

    On topic. Looking at BIOS now. Seems to work on most things except RAID. Any pitfalls?

  16. Walkig the registry while not necessarily to bad is still a bit of work and doing that regularly to detect addition or removal of drives seems a bit expensive to me.

    The USB detect I have uses message notification for removal andinsertion (oh what I'd give to tap into windows messages fromLabview:P) . It just walks the registry to find out what was removed or inserted from the device ID returned.

    And the registry unfortunately doesn't help in my case either. The serial number is not in there!!!

    Good to know that that's not foolproof either.

  17. I'm probably missing the point in this. :wacko: What do electrons on the pavement have to do with a proper bidirectional USB protocol?

    Rolf Kalbermatter

    LOL.

    Bi-directional isn't the same as full duplex. In RS485, you cannot have 2 devices driving the line at the same time, i.e in contention. (In full duplex you can TX and RX simultaneously since you have 2 pairs of wires). If 2 drivers try to drive at the same time (e.g a master is transmitting whilst the slave isresponding) the electrons get confused and you will get rubbish on the bus.

  18. Good idea! thumbup1.gif Except it doesn't work in our cases. frusty.gif

    I went back and looked a little closer and the libraries in question use .NET Constructor nodes which don't use the path. You have to go through the dialog box to select an object out of those that (I assume) have been registered with windows. The reference to the .NET object is then stored in the class private cluster.

    The .NET Refnum control in the class data cluster uses the same dialog box to define the reference type, and I'm guessing this is what is causing the constant resaves. It looks like any VI that uses that reference to call the object's properties or methods triggers the 'vi changed' flag and prompts for a resave because "Name or location of VIs in the file system changed."

    Any other ideas?

    Ahh. I have a rule with our programmers. No .NET and No ActiveX. If a "Texty" wants a feature from one of those technologies, he can get off is arse and write it, and while he's at it, make it really easy for use in LV (i.e no obnoxious referencing). You'd be surprised at how often they come up with a far more elegant solution :)

    Your options are limited. Unfortunately, the modification bitset is read-only-no help there! You could walk the project list using a vi installed in the environment that re-compiles any vi's when a project is loaded,, but I expect your SC would still complain that the file has changed.

    The only viable way forward that I can see is to enforce a directory structure so that they can't put the files anywhere and can only check them out to a single "working area" which is the same on all machines. We do this anyway as it means anyone can go to a machines and not spend 10hrs hunting for files.

    • Like 1
×
×
  • Create New...

Important Information

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