Jump to content

Neville D

Members
  • Posts

    752
  • Joined

  • Last visited

  • Days Won

    2

Everything posted by Neville D

  1. QUOTE(adriaanrijllart @ Aug 14 2007, 10:46 AM) The derivative of a signal is going to make the noise problem much worse. Discontinuities in your point data will cause spikes in the derivative. That is why its never a good idea to use it in practice. This is also the reason why increasing the derivative gain in a PID loop can cause the loop to go unstable. Better approach: fit a polynomial curve to the data and take its analytical derivative which should be fairly smooth and continuous. Neville.
  2. Hi Jim, Are you reading the channels hardware timed or software timed? What sort of hardware are you using? Hardware timing might reserve the scan clock resulting in the 'resource reserved' error. Neville.
  3. QUOTE(adriaanrijllart @ Aug 8 2007, 06:27 AM) Hi Adrian, Though doing the calculation without a loop is possible, the code will now make two extra copies of the arrays Y and t possibly even a third copy for the dY/dt output; this may not be a big issue for "small" arrays, but with very large arrays this could affect performance due to memory manager calls. I would suggest using the loop approach to limit the memory issue (even if it is not a concern presently). This would prevent possible future performance issues. Open your VI and select: Tools>>Profile>>Highlight Buffer allocations to see what I'm talking about. Neville.
  4. QUOTE(george seifert @ Aug 9 2007, 10:02 AM) Aah, but if you need the new multi-core functionality on LV-RT (or possibly LV) where you can target a specific timed loop to a specific processor core, you are stuck using them. Still scratching my head as to how to implement a state-machine using a timed loop.. does it even make any sense doing that? Neville.
  5. QUOTE(Aristos Queue @ Aug 10 2007, 02:12 PM) I think thats a fantastic addition! This will help with a free (possibly slight) performance improvement as well (as mentioned in earlier posts around LAVA). Great job! (And it was nice meeting you at the LAVA Barbecue). Neville.
  6. QUOTE(zoogies @ Jun 25 2007, 02:05 PM) Why don't you talk to your local NI rep? He can guide you through the upgrade type questions. I think you can't get the old-style IMAQ for 1394. You have to buy the latest IMAQdx. But it comes with the last frozen version of the old driver as well. It should work with LV7, as before, but there won't be any new features/functions in the old driver (depending on what version of the old driver you have). Also, the newer versions of IMAQ support Gig-E cameras which are becoming more popular than FireWire cameras. As for latest features, check out the whats new for LV 8.2.1 to get all the upgrades & features. You might even look at bundling the IMAQ/Vision with LV under the SSP, that significantly reduces your upgrade costs in future. Talk to your rep. LV 8.2.1 with Vision 8.2.2 and the latest IMAQ is fast and fairly stable (I haven't used any of the OOP stuff which might be a bit more delicate) apart from the slowwww startup time of LV 8.2.1. LV 7.1.1 was pretty stable too. Neville.
  7. QUOTE(MartinD @ Aug 1 2007, 05:16 AM) Yes, I've had that happen a number of times as well. Somewhere in there, you can change the internet mirror sites that VIPM looks at for the downloads.. if you change the order of the sites so that the geographically closest one is first, and so on, it seems to help. At other times, just wait a while (maybe a day) and try again. You might also try changing the timeout value to about a minute or so. Neville.
  8. QUOTE(george seifert @ Jul 30 2007, 01:03 PM) How about enabling debugging for executables, and trying to track it down using that ? I am assuming you are using LV >8.x Neville.
  9. QUOTE(wallyabcd @ Jul 27 2007, 03:30 AM) Hi Walters, Take a look at http://www.kshif.com/calcexpress/' target="_blank">CalcExpress, a commercial product which seems to have very advanced capabilities for writing scripts under LabVIEW. Neville.
  10. QUOTE(Ben @ Jul 26 2007, 11:46 AM) True, but disabling or enabling the plot will show all the data available in that particular chart view, when the switch is toggled on enable. With the NaN's data will only start showing up after the toggle. I guess you could use either depending on the requirement. Neville.
  11. QUOTE(sm07 @ Jul 26 2007, 09:40 AM) You could use a Q, where you write data in one of the VI's and read it elsewhere. Q's are very easy to use, and will make sure you don't loose (overwrite) any data that you haven't used in your consumer VI. If you don't care about missing data, then maybe use a notifier. See LV examples for more ideas. If you must use globals, then use a functional global (an unitialized shift register VI with read/write access), as the native LV globals tend to make copies of the data. Neville.
  12. QUOTE(Dirk J. @ Jul 26 2007, 09:47 AM) Going off-track for a bit, there is a very useful re-sample VI buried somewhere in LV (I found it by breaking apart an express VI: Align & Resample Express VI), which is extremely easy to use and works great.. it probably might work with the variable dt as well. But, I wouldn't recommend using it in this particular case. Neville.
  13. QUOTE(abuch06 @ Jul 26 2007, 10:18 AM) Sure, you can display 26 channels if you want.. question is can any human can make sense of such a display? Like I said, split them into 7 groups of upto 4 channels each. No, as far as I know, there is no way to stack groups of channels. Have some sort of selector (multiple selection from a list-box?) that allows the user to select the 4 channels that they want to view in a plot, and show those 4. You can use property nodes of the chart to display or hide the channels; plot all 26 in each group, but display only a maximum of any 4. Most technical people, when asked what data they want to see on a graph, reply "everything". That saves them the trouble of thinking through the question, and coming up with a logical answer. But if you go through the process, some channels naturally will need to be seen together, others might not. Spend some time on this process. I used to work in the fuel-cell business where hundreds of variables needed to be monitored in real-time. Still didn't need to plot them all together. Temperatures and maybe a critical pressure or two, went together, fuel-related params went together, sub-system params were lumped together etc. etc. QUOTE(abuch06 @ Jul 26 2007, 10:18 AM) Another question with the program... I need to be able to build an array that cuts out values from a previous array. The previous array is 3D, first two dimensions are channel and values, the 3rd dimension I assigned a 1 to the values I want to keep and a 0 to the ones I want to cut. I cut out the values with a case structure inside a nested for loop but when the case is false it still requires an output. I tried using the "default" output, but that just pads the areas that i want to cut out with zeros... I know there has to be a way to do this, but I'm just not seeing it. In future, post a picture of your block diagram (or post your code). I suspect you need a shift register to pass values previously collected, through the False case. Maybe use a Build array in the True case. Neville.
  14. QUOTE(abuch06 @ Jul 26 2007, 06:16 AM) How about using different line styles (dots, dashes etc) different colors, and different thicknesses? right-click on the "plot 0" (legend) for these options. Alternately, you could put a cursor on each plot and rename the cursors with the plot names. PS From GUI standpoint it is never a good idea to have more than about 4 plots per chart/graph. You might want to break it up into a few separate graphs. Neville.
  15. QUOTE(Deon @ Jul 24 2007, 04:14 AM) Thanks again! N.
  16. Hi Guys, I was trying to find App Note 168 the famous "LabVIEW Performance & Memory Management" bible on the NI web-site. It seems to have been pulled. It says refer to your LabVIEW help (which is a mish-mash of random thoughts in various different locations). Anybody have an old copy handy? Neville.
  17. QUOTE(ntward @ Jul 20 2007, 09:13 AM) Certainly, it is quite elegant. You could put different valves (or subVI's) on different tab sheets of your top-level VI. The only issue is that the code might be hard to understand or debug, for a new LV-er with VI's called by reference, etc. I would go with a toggle switch for every valve, and a status indicator (enum). Toggle valve--->show status Open Success, Close Success, Open Failed! Close Failed! This would be in a subVI in a main loop or event Structure. User hits a valve toggle, that generates an event to do the action, and the enum shows the status of that action. You can color the enum differently for a fail (use a property node and color background to red or yellow for a fail etc). I would also look at the different types of code architecture producer-consumer, event driven state machine etc in the examples to get some ideas. N. Neville.
  18. QUOTE(VRPaul @ Jul 20 2007, 03:00 AM) You could probably use a Chart instead of a graph, but you would have to put both the NaOH and the pH on the Y axis, and X axis would be time. You can have multiple Y-axes (one on each side of the chart) for the two variables. Trouble with the graph is that it is re-drawn every time even when a single point is added at the end. That said, there is an example in LV that shows how you can use a graph like a chart with updates. Neville.
  19. QUOTE(ntward @ Jul 20 2007, 08:41 AM) You can load the front panel of a subVI into the main VI using a subpanel. Check LV help on "loading a front panel in a subpanel". Note the subVI then has to be called by reference, and you can't plonk the subVI onto the block diagram of the top-level VI. I am sure your next question is going to be "whats call by reference"? I suggest you take the time to read through some basic LabVIEW tutorials or a good starter book like Jim Kring's excellent text or Gary Johnson's wonderful reference. Also, there is an example showing loading of subpanels in LV. This will go a long way in getting you up and running quickly. Neville.
  20. QUOTE(67nate @ Jul 19 2007, 11:45 AM) Run the code with the Lightbulb ON. Is the error coming frm the Init Serial? If so, play around with the parameters until it works. Data bits 8, Parity None, Stop bits 1, Flow Control Off seem OK values. Try termination character Enable or Disable and of course set the Baud rate to match, or even Stop Bits None (check your Agilent manual to see what they recommend). Have you tested with MAX using the Serial connection or GPIB? If serial, try to figure out what the settings for the COM port in MAX are. I seem to remember there was a way to generate code when sending some commands from MAX. Generate code if you can from there, and run that. Try a very simple program No loop etc to complicate anything (run in execution highlight mode->light bulb ON, so there are delays after every step): Init Serial Port Write command *IDN? Read response (it should be the identifying string for the instrument "Agilent...blah blah serial number..etc.") Sorry I have no hardware to help any further. You might look at the example code for the instrument included with the driver. Try running something simple from there. Neville.
  21. QUOTE(67nate @ Jul 19 2007, 10:00 AM) 1 'Configure Serial Port' should be outside the loop so the port is configured at start, and never again. 2 Visa Resource Name should be COM1 or COM2 i.e. the serial port in use; in your case you have it set to 34970A? 3 Have you configured the instrument to use 19200/No Parity/Stop bits..etc same as the settings of your COM port? 4 Try running the code without a While loop to see if it even works on a single run. 5 There may be a way to communicate simply with your instrument using NI-MAX to see if you have all the settings right. If it works in MAX it should work with your code (i.e. you have set up the instrument correctly). Neville.
  22. QUOTE(HeLo @ Jul 18 2007, 02:09 PM) You can right-click on the variable whose local you want to make and "create local" from there.. no need to scroll through the list of variables. That said, note that a local variable involves making a copy of the data. If you have a bunch of arrays or complicated data structures, execution speed and memory efficiency will definitely be affected. Race conditions are another issue (for globals or locals). Neville.
  23. QUOTE(MichaelHill @ Jul 18 2007, 12:09 PM) You can set the default value in one of two ways: 1 Make a local variable of the list box (make sure listbox is set to Selection mode of more than 1 item) 2 write an array to it of 0, 1, 2, 3 http://forums.lavag.org/index.php?act=attach&type=post&id=6396''>http://forums.lavag.org/index.php?act=attach&type=post&id=6396'>http://forums.lavag.org/index.php?act=attach&type=post&id=6396 You can also use property nodes for the listbox to do the same thing. I leave that as an excercise for you. Neville.
  24. QUOTE(wallyabcd @ Jul 18 2007, 05:41 AM) You would need a separate LV-RT runtime licence to do this legally (about $900 US..) Neville.
×
×
  • Create New...

Important Information

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