Jump to content

crossrulz

Members
  • Posts

    533
  • Joined

  • Last visited

  • Days Won

    21

Everything posted by crossrulz

  1. First of all, I'm going to recommend the Producer/Consumer design pattern for what I think you are trying to do. I basically split up your code into a GUI loop and a Serial Communications loop. When you change a value in the GUI, the corresponding event should trigger and you then tell the serial communications loop what to send/read using a queue. I'm hoping this will give you enough of a kick start to get you going the rest of the way. Attached VI should be in 8.5. newvi.vi
  2. That sucks dude. We are worried about a big project of ours suddenly shutting down, which could put my job in jeopardy too. Still waiting for the end of the recession to hit main street...
  3. It's not open source, but NI does have a Linux version http://sine.ni.com/nips/cds/view/p/lang/en/nid/2541
  4. Looks like this is the same problem/assignment as here: http://lavag.org/topic/13769-checkbox-help-dont-know/ sjukheter: post some code of what you have and we will be a little more willing to help. We will not do your work for you, but we are willing to point you in the right direction if you show some effort.
  5. Assuming you don't have the Basic version of LabVIEW, use an event structure. It is much better than polling all of your buttons. Here is a picture of what I could figure you are trying to do.
  6. according to page 13 (PDF page 15), the cr is a carriage return, aka 0x0D, aka '\r'. Instead of \n (0x0A), you should be using \r
  7. Try setting the "Disabled" property on the strings. You can use the event structure to watch for the "Regulated" check box to change value and then set the "Disabled" property on the strings to either "Enabled" or "Disabled and Greyed Out".
  8. I have run into a similar situation with Switch Executive. You need to make sure you installed the support for "Latest LabVIEW Version" or for LabVIEW 2010 for the drivers. I suspect the former since the installer should have auto-detected LV2010.
  9. The idea has enough Kudos. But still wait for the "In Development" status to come up.
  10. decisions decisions... I bet you can't select to use either one (I noticed the "Use Selected Item" button was greyed out).
  11. Actually, there's an NI Update Service. I can't use it because of our network, but it's there.
  12. That was my first thought. Back in my Radio Shack days, I sold racing headphones (as in NASCAR) that had 60dB of reduction. Personally, I'm with Paul. I have my iPod and Bose QC2 noise canceling headphones. Sometimes it seems like I can't think without them on.
  13. See my first post. The Wait ms Multiple doesn't wait for the desired number of ms. I waits until the ms counter (a global counter) reaches a multiple of the input.
  14. Yep, you are using the wrong wait. On an aesthetic note, instead of using the sequence structure, you might want to consider using a VI like this for the wait. I admit that I took this function from the Bloomy's LabVIEW Style Book and then edited it a little. It uses the error cluster to keep data flow instead of using the sequence structure. It helps keep my code clean. And if you haven't already, vote up this idea in the Idea Exchange. Wait.vi
  15. I'm not sure I fully understand the problem. Posting some code would help the debug process. From my current understanding, it sounds like the Wait (ms) would be the function you want. The Wait Until Next ms Multiple function will sit there until the ms counter reaches a multiple of the programed value. So the first loop you set to 200ms. The Wait Until Next ms Multiple will sit there until the counter reaches 200. Next loop, you set the loop rate to 75. The Wait Until Next ms Multiple will sit there until the counter hits 225. So then you really only had a 25ms loop. Check out this snippet as an example. Note: You may have an output clock value off by 1ms due to Windows timing.
  16. I typically use FIFOs in an FPGA. In my current programs, I use 1 DMA to send data down to the FPGA and another DMA to get data back. I then have one loop that reads in the DMA commands and then sends the commands to the relevant sections of code (I have a digital input, digital output, square wave generation, and specific communication bus sections of code) using FIFOs. By using globals, you can slow down your FPGA since sections of code will be blocked until the other section accesses it. There are times that I used them (non critical timing), but try to avoid them.
  17. This doesn't look like it should work since you have a race condition on your Max Index(es). You really should use wires instead of the value property node. On another side note: locals are better than property nodes for getting/setting a value from a control/indicator, but a wire is best.
  18. I just started thinking about Ton's method. While I don't see the point of the "XOR" and then the "Not Equal to Zero" (just use the "Not Equal"), I think he has the right idea about converting the boolean to a 0,1 and then adding. This does seem like a much simpler implementation.
  19. oops, I originally looked at the wrong file... Where you are falling short is the fact that the arrays need to be predefined. I put data in the locations for a 5x5 array. If you are going to a 16x14, go to element 15,13 (because it is zero based) and put a 0. Do this for the Array control, "previous array" constant, and the "number of changes" constant and you should be good. I would also add a wait to your loop just so you don't hammer your processor. @ShaunR The number of changes is constantly being updated and saved in a shift register. Therefore a value change will not be missed.
  20. I was using the event structure as a simulation so I could see exactly what all of my data was doing when I decided that the "1 second new data" occurred. I was aiming more for the example than the actual code you should use. In reality, you should be getting new data once a second, compare it to the previous data, increment the changed array where necessary. So yeah, get rid of the event structure and replace the data control with your input data (however you are getting it) and exit the while loop however you plan on ending your test.
  21. If you post what you have so far we could help a little better. If reading your CSV is the issue, post an example of the CSV as well.
  22. What you need to do is count how many times each index has changed. To do this, use a second array for just the number of changes. You can use nested for loops to iterate to see which elements have changed and if they did increment that element in the number of changes array. Then at the end, see which elements are greater than 10. Array Changes.vi
  23. I'm with Ton. It looks like your default font size is larger than the standard 13 point.
  24. I'm a little confused about what you are trying to do. Are you looking for 10 of the elements to change (as you stated) or are you looking for an element to change by more than 10 (as you described in your program)? Here's my shot at both. Hopefully this will at least point you in the right direction. Note: I used a 5x5 array to make it a little easier to play with on the front panel. Array Changes.vi
  25. Yes, it takes forever to uninstall and install everything from NI. I would also recommend a registry cleanup. I have ran into problems where I would uninstall all NI software, reinstall, and my problem was still there. I found that I had to delete some registry entries in order to really start clean. Now that I'm thinking about it, it might be easier to reformat the hard drive and start from scratch.
×
×
  • Create New...

Important Information

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