Jump to content


  • Posts

  • Joined

  • Last visited

  • Days Won


Everything posted by jdunham

  1. Oh yeah, you are certain to get a copy there. You have that matrix on two totally separate wires on your diagram, so a copy is needed for each wire. Now in your trivial case, those two wires will never execute at the same moment (probably!) but if you make the diagram a little more complicated then they could execute at the same time and would absolutely need to have separate copies in memory of whatever might be in the two wires. This seems like a textbook case for DVRs, assuming you really need the producer-consumer pattern. I don't know too much about the internal implementation of DVRs, but it seems likely that dereferencing the DVR would be a very fast operation, and not something to worry about if your app is also throwing around 300kB arrays. Note that if you branch the wire of the matrix after dereferencing it, LV may still need to copy your data. Jason
  2. If you can create a VPN between the two computers, they will have extra IP addresses on the same subnet and you can create connections in either direction. If you can make an SSH connection, you should be able to make it act like a VPN. Search on the internet for "SSH Tunnelling". If you can't use a VPN, you will have to ask whoever owns the router create a rule for NAT (network address translation) that forwards inbound requests to your server PC inside the firewall. If none of that is possible or permitted, then like Tim says, you are probably out of luck.
  3. John, we use elevate.exe to run some batch files during our installs: http://www.wintellec...e-in-vista.aspx the batch files also check the windows version and the existence of "ProgramFiles(x86)" which exists as an environment variable if you are running 64-bit windows @ECHO OFFPUSHD %~dp0REM "FIND" will not be found without its path if you have cygwin installedVER | %WINDIR%\SYSTEM32\FIND " 6."IF NOT ERRORLEVEL 1 ( InstallationSupport\Elevate.exe CMD "" /C "CD /D %CD% && InstallationSupport\InstallAll.bat" ) ELSE ( @ECHO This installer is for Windows Vista and higher only! PAUSE)POPD This code finds our install folder and puts it in an environment variable so that other batch files can use it. @echo offIF "x%ProgramFiles(x86)%x" == "xx" ( REM CASE 32-bit REM Quote marks are added here to make it consistent with 64-bit case SET ShotSpotterProgramDir="%ProgramFiles%\ShotSpotter" ) ELSE ( REM CASE 64-bit REM quotation marks are unfortunate but totally necessary, or else the if statement cannot be parsed. REM this did not seem to be a problem in XP, but windows 7 chokes on it. REM the added quote marks end up in the environment variable, but everything seems to work OK. REM even the quotes end up in the middle of paths built using this variable. REM if the additional elements of your filepath have no spaces you will be all set. SET ShotSpotterProgramDir="%ProgramFiles(x86)%\ShotSpotter\" )REM enable next line for debugging:REM @echo ShotSpotter Location = %ShotSpotterProgramDir% - Jason
  4. Thanks! It's weird that it changed itself, but I'm glad I know how to control it now.
  5. I have a different issue on this topic. Starting sometime this week, View Unread Content only shows new posts since I last visited the site, essentially marking all other threads as 'read', whether or not I actually visited them. I'm using Chrome 5.0. Jason
  6. jdunham

    DC Motor

    Normally you would control a DC motor with a motion control board. There are a whole host of technical problems that these boards solve, and NI and many other vendors sell them. It is usually a huge waste of time and money to reinvent that stuff. If that is not a permissible way to solve your problem, then it would help to give more information about your situation. Is this is a school project where you are supposed to learn about electronics or feedback control systems or programming? Are you developing custom motion control hardware and want to prototype it with a flexible DAQ system? Is it for hobby use and the requirements are simple enough that the motion control HW cost is not justified? If we know more about where you are going, we could help you get there. Jason
  7. Well if you call them "LabVIEW threads", then 'yes', but if you mean OS threads, then 'possibly'. My understanding is that the LV execution engine can use one or more OS threads, as it sees fit, to execute your compiled chunks of diagram code. There is a little bit of explanation in the Labview Help under "LabVIEW Threading Model" (help index: "threading model") and "Execution Systems in LabVIEW" (help index: "multithreading, execution systems") The explanations are rather brief, but basically you are not supposed to worry about it. Still it's helpful to know that LabVIEW threads are not OS threads, and neither are LabVIEW Execution Systems, just in case you are using some system analyzer tool which monitors OS threads and you see something different than you expect.
  8. Around here we call them "LabVIEW threads". I think it's a reasonable name because they have the same purpose and behavior as OS threads, even if the implementation is hidden in the LV execution engine. Even though it's much easier to implement a LabVIEW thread than an OS thread in many other languages, that's just one of the cool features of LabVIEW, it's not a reason to change the name. As a related example, you might have some operation that "reads data from disk file". But if you have a modern OS, it often occurs that the data is actually acquired from a cache and is not coming directly from the filesystem hardware (which of course may or may not be disk-shaped). But you don't care, and no one thinks any less of you that you chose your words imprecisely. And if LabVIEW inserted some other gee-whiz functionality to further change the implementation of disk-reads over what the OS provides (the way they do with threading), then it still wouldn't be a reason to change the name.
  9. I agree with Scott. I've been using Value Changed for years with booleans and it always works well for me, including handling the edge cases Scott just mentioned just as the end-user would expect. Further, if you have set Key Navigation for the buttons, then Mouse Up is not going to fire and the user may wonder why your code doesn't work. I suppose you could program keypress events to duplicate the Key Navigation functionality but it works fine if you do it the easy way. Also with Value Changed, you can easily simulate the button press with the Value Signalling property if you need to test your code or chain events. Under normal configuration and use, you do not get more than one Value Changed event for each button press. I'm not sure what is causing the OP's problem if it's something other than what George suggested. Jason
  10. I have not seen that. I am running the same LabVIEW (LV2009SP1 32-bit, running on 64-bit Windows 7). I have Chrome open all the time, but I don't see crashes like you describe. I don't run the LabVIEW Web Server. Good luck chasing it down!
  11. I feel like people haven't mentioned the obvious here: You can also set your VI to show when called, or else drop it in a "subpanel control" if you don't like the popup window. This way you can get the same data view you are accustomed to with the least amount of programming.
  12. I would be shocked if the Copy primitive used something other than a direct OS/WinAPI call. I still think rewriting OS functions is a crazy thing to do, but I understand the need to keep your users from pulling the plug. When the file is getting transferred does anything appear on the other end? To wit, you may be able to: 1. read the remote file size (the source file) 2. Use the Copy File primitive to start the transfer to a new target file 3. In parallel, start monitoring the target file size, displaying a progress bar for the percentage transferred. 4. Terminate the progress bar popup when the target is at 100% size. The great part is that if your code has bugs, it shouldn't affect the data, just the user experience.
  13. It was suggested that you roll your own, but you will lose any metadata (modification time, permissions, creator, etc.) which may be attached to the file. It also seems like a waste of your time to rewrite components of your OS. What's wrong with System Exec.vi and invoke XCOPY if it's working for you? If you really need to write something, i think there is a network queue library somewhere around here. That sounds like the easiest way to send a file across a network, as a queue of strings. The first element in thEdite queue could be the number of chunks to expect, and maybe any other metadata you want to send, like file timestamp (though then you would have to find some API function to fix the timestamp to match the other system.
  14. I have this configuration and it works fine. In general a 32-bit app doesn't know anything about a 64-bit OS. It's the OS's job to provide a virtual 32-bit environment for the 32-bit app to run in. So 32-bit LabVIEW is going to build you a 32-bit app which will run fine on XP.
  15. The flatten and unflatten functions should be able to handle any data type. You should be able to make this packet into a typedef cluster and use it to flatten data for sending over UDP and unflattening data received from UDP. Maybe if you post some code or diagram screenshots we could see where you are going astray.
  16. Yes, you are correct. If you have many notifiers and continually look them up by name, you will pay a penalty for that, but if you wire the notifier references directly, they are very fast and reliable. Our application has dozens of parallel while loops (sometimes hundreds) and most of them wait in an idle state until data is received on a queue or a notifier. I think we would need to know more about your application. Notifiers are themselves references, but with a built-in trigger for catching updates. However there is no protection from a race condition or a missed update. If you are streaming data to multiple readers I would use one queue for each recipient and have the single writer looping through the array of queues every time there is a new update it needs to broadcast.
  17. There is a Zip subpalette in the Files palette. If your LabVIEW is ancient, they may not be available. There is also an OpenG toolkit with more functionality.
  18. I apologize for not answering your exact question, but have you considered using PPP over serial? This is built into Windows, and you will end up with a network between the two computers. You could either share files directly or else use LabVIEW's TCP/IP functions which are going to be much easier to work with for data transfer. All the problems of link detection and error correction have been solved by other programmers long ago. If this is a school assignment or there is some other reason to use obsolete stuff, then maybe you can post your code and forum members can try to help with specific problems.
  19. What do you mean 'create a pulse'? Do you have some hardware (like a board from NI) to generate pulses? Which one? What have you tried so far. If you post the code that you've tried already, then maybe someone on the board can make some suggestions.
  20. I have seen something like this, though I haven't reported it because I can't accurately reproduce it. I regularly work in LV2009 with an LVProject open which has about 3500 VIs. Usually everything is normal. When LV gets slow, then often the open windows rearrange their Z-order in the middle of an editing operation, which is very frustrating. Switching from front panel to diagram or changing windows and some editing operations will cause this. On my laptop it can take more than a minute to regain control of LabVIEW, though other applications are not affected (thankfully). This is much more likely to happen if I have more than one project open. It may also happen if I open an lvlib or an lvclass open in its own window, but I'm not sure. This also tends to happen if I use ctrl-F in the project window to find a VI, though it doesn't always happen. Once it starts, the situation does not improve until I restart LabVIEW. Does this sound like the same problem?
  21. Is the VISA Read node throwing the error, or is it some other VISA function? What is the VISA Resource Name? Are other VISA functions and property nodes working?
  22. If you use a Diagram Disable structure for this, it makes your intent clearer. You can also use 'create constant' but you will want to make sure that it doesn't have some non-null value in the constant when you create it.
  23. So what about all the SVN 1.5 changes for merge tracking? Have you tried to use them with your labview. I have to confess that I haven't tried, but it's on my list since it seems like these would go a long way toward fixing merge problems.
  24. Last time I looked into this about six months ago, the bug which had destroyed performance in the lvclass implementation had been fixed as of LV2009, but variant attributes still blew away the lvclass implementation in terms of performance, so we are still using that for hash tables. You'll want to keep your variant (which doesn't need to contain any data itself) in a functional global (aka LV2 global). You could also keep the variant in a data value reference or in a single-element queue to protect its integrity.
  25. That seems like it would do what you are asking, but another idea is to configure a PPP connection over the modem. Then you would have a network and could use more modern tools shared folders, etc. to transfer your data. The nice part is that if your link changes to more modern network hardware at some point in the future, your code would not be affected. I would think it's a waste of engineering time to write modem software when various OS components, which are generally much better tested, will do the job for you.
  • Create New...

Important Information

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