Jump to content

Michael Aivaliotis

Administrators
  • Posts

    6,214
  • Joined

  • Last visited

  • Days Won

    117

Everything posted by Michael Aivaliotis

  1. I'm just throwing this out there to see if anyone else has had this problem. I have a M series DAQ card connected to an SCXI chassis that has a thermocouple module in it. The issue I'm seeing is that after a power failure, when the labview application starts talking to the card again it gives back an empty array of data from the DAQmx vi's (with no errors). The solution is to re-create the DAQmx channel configuration. If the system is shut-down and re-started gracefully then all is fine.
  2. I would think that the memory usage would be the same since both approaches use a shift register. The only thing I see is a bit of overhead during the conversion process from variant to datatype. Also you have the issue of a call to a VI which takes up very little cpu time but a VI call nonetheless. If this VI will be called from a single caller all the time then I don't see the point. I would prefer to use a shift register in the caller. Like I said before, this would be a good a pproach if this VI is called from multiple callers.
  3. Well, one quick thing I can come up with is the following (see image). This will speed up your longest loop. to detect the button press faster. You can do this to the other loops as well but you should use the tic count timer instead of the seconds since function. This will give you finer resolution. There is probably a slicker approach but this is the best I can do quickly.
  4. Well, the approach really depends on what you are trying to do with the data. For example, is the data usually written to all at once all the time? If so then you might want to always write the data in one shot as one cluster. The only time I would write individual values would be if the writing will happen in multiple places in my code.
  5. Well, all looks good as far as I can see. Now that all processes are in parallel, the queue messaging architecture makes more sense. This way, if one process is waiting for a message, it doesn't hold up the others. Good job! :thumbup:
  6. Ok, here it is is. I built a LV6.1 example that shows how to have a server that sends data to whomever requests it. This one shows 2 clients and is done with parallel loops for simplicity. Of course these can be put into Sub-VI's. The datatype used is string but you can use anything really. I know some people use variants. Enjoy. Download File:post-2-1112239412.vi
  7. Yes. All you need to do is separate the VI's into separate parallel loops. This will allow the "slow" VI's to run at any speed they wish and the other VI's won't be affected. It should be straight forward but if you need any help let me know and I can post the modified code.
  8. Nope, no problem here. never seen this. Do you have sticky keys enabled in windows? This is in the disability aids section.
  9. I can't answer all your questions since I've only been using DAQmx for a short while. This is what I've learned so far: You should configure all your individual channels as global channels first. Each global channel should be configured for each input sensor. Also, you should configure each digital IO line as a global channel. The global channel configuration defines the scaling and other parameters. Once this is done you then go and configure the required Tasks. Tasks define how you collect the data. You can create a single task that contains many global channels. In the task configuration you will define the aquisition speed and triggering etc. In you LabVIEW program you will use DAQmx task ID's not global channel id's. Hope this helps.
  10. The code you submitted does not have many nested sub-vi's. I've developed applications with thousands of VI's and they run very quickly, efficiently and everything is synchronized. Your code is very lightweight so the lag you are seeing must be comming from somewhere else. The solution to your problem is to simply to create subvi to handle the port writing and place that wherever you need it. I built a quick VI to do this for you and I modified your original code to include this VI. Basically just place the VI down wherever you need to modify one item. The VI remembers the previous states of all the items so you don't need to worry about synchronization. One thing I noticed is the multitude of File IO. Is this really necessary? File IO is a big bottleneck. Download File:post-2-1111825775.llb
  11. The upload limits have been increased. Jack, can you try posting it here again?
  12. You can talk to a MYSQL database with LabVIEW using the Database connectivity toolkit or other tools floating around. What do you need the PHP for? You don't need this to access database data. Please explain the need for LabVIEW to talk to PHP.
  13. If you just want to distribute data to many readers then another option is using USR globals. This might be easier to work with. Here is an FAQ entry on them: http://forums.lavausergroup.org/index.php?showtopic=273
  14. Why are you using non-latching buttons? Please clarify. What mechanical action are you using?
  15. This statement doesn't make sense. An event structure cannot react to a change in a local variable. Event structures only react to front panel events. It should be ok to use a local variable to pass data, however there is no synchronization. You have no guarantee that the loop has read the old data in the local before new data has become available.
  16. I would say this is a real bug. There seems to be some kind of disconnect between the button value and the updating of the front panel. If you do the following, it seems to work fine.
  17. The LabVIEW scripting Forum is a place to discuss and investigate ways of using LabVIEW to programmatically generate LabVIEW code. In other words you can write a VI that will (when executed) create another VI. You may have seen some of this functionality in use already. NI uses this capability internally in some of their code generation tools. For example, if you right-click on a DaQmx task node you can select an option that builds a code example or a configuration VI. This wizard uses special undocumented features of LabVIEW to do this. VI scripting is a powerful new LabVIEW feature based on existing VI Server technology. Using the scripting API, you can create new VIs, create new front panel and block diagram objects, modify existing front panel and block diagram objects, or inspect existing front panel and block diagram objects. VI scripting allows you to write a VI to programmatically accomplish almost anything you could accomplish in LabVIEW's interactive editor. VI scripting is not advertised or available in the LabVIEW help files that are distributed with LabVIEW. This could be for many reasons. Some of these are: - NI has not finalized the implementation. - The implementation is hard to use and NI wants to make it user friendly. - NI has not decided to make it a publicly available product. - The existing implementation contains many bugs. - NI does not want to burden the support system with issues related to an unreleased product. Because of the previous statements, you are on your own: DO NOT contact NI for support on VI Scripting. DO NOT use these features for released code or applications to your customers. DO NOT count on the implementation to stay the same for future releases of LV. It will change and your code will not be upgradable. And Finally--> Your computer will explode, you will lose all your valuable data and local law enforcement will come knocking on your door. So BE WARNED! Do not blame NI or anyone here at the LAVA Forums for any problems that may arise from using these features. The Details: VI Scripting is exposed to you via methods and properties. To enable these methods and properties, you must add the following line to your labview.ini file. This file is located at: C:\Program Files\National Instruments\LabVIEW 7.1\labview.ini Add the following line: SuperPrivateScriptingFeatureVisible=True After you restart LabVIEW, place a property node down and click on the various properties. You will notice more items in your list. One more thing. To expose the "create object" primitives shown below, you must install VIPM and install the package called: ogmnu_appcontrol_plus *Update* Others have also had success with the following ini entries (don't know what they do): SuperSecretPrivateSpecialStuff=True *Update* Adam Rofer has made some interesting discoveries on some scripting related information. He calls them XNodes. Good work Adam. :thumbup: Here is the website: http://xnodes.lavag.org
  18. Yes, you can do this. See attached image:
  19. Also, don't forget that the entire LabVIEW run-time engine is downloaded and installed if it doesn't already exist. At least, this is my impression. The benefit of using remote panels is the browser interface.
  20. See link: Student Robotics in China
  21. This is a good solution. Another option is to take the output of the ring and use that to index an array of numbers that you want.
  22. See image. This function will do it. What operating system are you running? Why do you ask about Linux and Windows?
  23. By default, if you don't touch the priority settings on the sub-vi's they inherit the settings from the caller. Time-critical priority really only has significant effect in a LV real-time OS. Is this the case?
  24. That's golden. I would have liked to be there to capture the look of that customers face.
  25. Did you also think that the movie "Broken Arrow" was a story about a frustrated LabVIEW programmer battling the forces of evil to get his little Vi to work?... I did. Broken Arrow
×
×
  • Create New...

Important Information

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