Jump to content

Ducc

Members
  • Posts

    23
  • Joined

  • Last visited

    Never

Everything posted by Ducc

  1. Ducc

    Encoder + DAQmx

    The DAQ Assistant is doing stupid things. If I disable the z-index feature, the main program works. The only problem is I need the z-index. Otherwise, the encoder doesn't stay zeroed. If I just run the VI in Figure 1, everything works perfectly! The encoder is always zeroed and the z-index behaves. But when Figure 1 is called from another VI, it starts acting stupid. Even more annoying is that when some VI's call it, it doesn't happen. I can't figure out what it depends on. Maybe some loop configuration? I might go insane.
  2. Ducc

    Encoder + DAQmx

    Hi, I've recently purchased an NI 6220 daq card to work with my encoder. It's all wired up correctly (as far as I can tell), and I can get the card to read the position of the encoder just fine. Figure 1 The extra stuff just makes sure the output doesn't go negative or above 6.28 radians. Now these two screenshots show the VI that uses the encoder code you saw above (Figure 1). The grey icon "encoder" is Figure 1. Figure 2 Figure 3 As you can see, the For loop switches from True, to False over and over until the loop ends. When true, it takes data. When false, it just waits. Both true and false cases check the encoder to see where it is. The problem: when the encoder moves from the daq section to the waiting section, the value of the encoder jumps to a value of 2.0xxx radians (which is probably the z-index triggered value). The encoder is NOT in the position in which the z-index should be triggered! I can't not reproduce the behavior in another VI, and replacing the encoder subvi with a new link does not fix the behavior. Please let me know if you have any idea what might be going on. Thank you very much, -James
  3. The problem is the adlink DLL doesn't seem to want to work. I may be doing something wrong, but I've done it successfully before with other DLL's. It's not that hard, right? Just link the DLL, tell it what function to use, and add the necessary inputs and outputs? The reason I can't just buy different hardware is that this program will run on multiple machines; I'd have to buy a lot of cards. If I can't get the DLL working, is it my problem? Can Labview work with all DLL's?
  4. As the topic suggests, I'm trying to get an ADLink PCI-8133 DAQ card to work with labview. I'm using the card to read the position from a stepper motor. ADLink has a labview package (DAQ-LVIEW PnP V1.21.zip) but it does not support the 8133. I think a competent programmer could write all the Labview drivers (assuming they had access to the dll's) in a week, which leads me to suspect the dll's written for the 8133 are incompatible somehow. Any suggestions? What do you do when you come across hardware that won't work in Labview? Are there any workarounds? Thanks, -James
  5. I would also like to know where to get a "standard deviation of the mean" VI. There seems to be so much missing from the Student Version of Labview 7.0. Maybe I just can't find it?
  6. Hey, I have some data that should be roughly linear. There is the chance for outliers in the data, and I want to remove as many as possible. From my readings in statistics (of which I am largely ignorant), 2-d data filtering is really a function of the data itself; in other words, it's hard to filter the data if you don't know what it looks like. However, since my data is linear, I see no reason a generic filter wouldn't work. 1. Is there a place where I can find filtering VI's for linear data, available for free? 2. If not, are there techniques you can recommend to write my own? Thanks! -James
  7. I was about to post the same question, except for Excel (or any spreadsheet) files. No matter how I wire things, I'm getting broken wires and "bad data type" errors.
  8. oooooh! Yea, that's exactly what I wanted. Thanks
  9. Heh heh. I did didn't realize I had already done it before I posted that. I think I need my head checked. So my questions changes. Is this the most efficient way to do this? I'd describe the process, but I imagine you can look at the code and understand better than reading a description.
  10. Hi. I've tried to find a good guide for this, but I'm coming up short. I have a set of data that I need to break out of an array, do some stuff to, and put it all back together. I seem to be able to get the data out, but I'm having a hard time putting it back in. It seems as if LabView don't care if it's a 1d array column, or a 2d array row. Here is a graphical description of my problem. Can someone point me to a good "labview array reference", or give me some hints here? Thanks! EDIT: I should note that I'm also concerned with speed. The faster this operation completes the better. Millisecond saving is valuable.
  11. Yea, I didn't really understand that post. I figured out how to make it work, but I don't know why it does.
  12. I apologize in advance for my vocabulary; I'm not foreign, I just don't know what to call stuff. I have a case structure inside a loop (state machine), with the case selector wired to a list of available cases (you know, the dropdown box thing that everyone uses for state machines). I had Initialize, Clear Data, Run and Save Data in that list and the case structure showed the names at the top. Everything is good. Then I added "No Event" to the list and all of the sudden the case structure switched from names to numbers. So I undid what I just did to go back to the names, and this time I manually added the case to the case structure's list. The case appeared in red (is this bad?) but at least the name is written out. I can't get the list to include "No Event" (or anything) without the case structure going back to numbers. Is there a limit on the number of cases you can include before it only shows numbers? (um, I just put quotes around “No Event” when I placed it in the list. It didn’t go to zero but it didn’t show up in the case structure either. So I deleted the quotes and it worked. What’s up with this?)
  13. Oh, I forgot! Some NI rep told me about some way you could make two loops that operated independently of each other... one loop controlled the GUI, and the other loop did all the machine interfacing and junk. That way, you could let the user do things while something else was working in the background. What's that all about?
  14. Hi, I hope this hasn't been asked a million times already. I searched. I have some experience in Labview (I wrote the somewhat basic software that my lab uses) but I don't consider myself a programmer. I'm an engineering student that sometimes has to program to get work done efficiently. That being said, I need help with the "rules of labview". I've been charged with writing a couple other programs over the summer, and I'd like to know things that regular programmers already know (OpenG is good?). I’d like to learn more about state machines. And so on. Are there any good labview resources out there? I need explanations about how things work, and to be exposed to things I'd never have considered (state machines). Thanks! -James
  15. Because I don't even understand how I should wire the card. For instance, there is an example that reads the input (I think). If I stick a wire in the first hole and a wire in the ground hole, and then short the two, the example shows bit one going to high. I have no idea why. I can light an LED with it. But if I wanted to control whether or not the ground goes to high, how would I do that? How can I control the LED?
  16. Hi, I'm a newbie at IO programming, but I'd really like to learn. I was given an Advantech PCI-1730 to play with, but I'm having trouble understanding the concepts involved with making it control a relay. The card came with a few examples, but they all eventually lead to subvi's that link to C code, which I can't find. It makes it horribly annoying to learn from. I know how to send GPIB or VISA commands to a machine, but this doesn't seem to support any similar commands (unless I just can't find them). My question is, what should I read? What website should I start at? Does anyone have any tips on programming this card to control a circuit? Thanks for any help! -James
  17. Yay! I'm self-taught, so I still have some learning to do. Okay, that sounds good. I'll see if I can't figure this out. Note: I don't need to interrupt it, I can just ignore the output when it finishes (the time doesn't matter so much as the data being overwritten). Thanks.
  18. Hey, I'm not really sure how to even search for this, so I'll have to ask you. I have a button that tells some equipment to start taking measurements. When the measurements have been taken, the program reads the info from the equipment, parses it, and sends it to an array. But sometimes we click the wrong button. And when we do, we curse. So I want to include a Cancel button that will ignore the data that comes from the machine. My problem is, it reads the value before it lets me click the button. It won't even register that the button was clicked until the equipment is finished. LabView is so linear, I guess my question is "how do I do two things at once?". Thanks -James
  19. Hi, I've made a user interface that is clean and simple. It really works quite well. I've hard-coded the commands and options we never use (with no real possibility of using them in the future), and made decisions for the user (Should I automatically save the images or not?) that I personally prefer. I am almost exclusively using this program, and the others have no complaints. However, I'm not going to be around here forever. I'd like to include additional functionality (mostly in the form of set-and-forget options), but I despise the idea of cluttering up the front end. Ideally, I would like to create an "Options" button that brings up a new window with settings that may be used in the future. I'd like a "Okay" button on that window that closes it (and uses the settings). I can't figure out how to make a new window. Is this possible to do? If not, can you think of any way to "bring up and hide" a set of options without using a separate window? Maybe setting a group of objects to Visible or Invisible? Or setting the real interface to move off screen and bringing the options interface to the current user position? Thanks for your help! -James
  20. Ah! Thank you very much.
  21. Hi, I've gathered some data from an instrument, parsed it, and sent one part of the data to the X-array, and the other part to the Y-array. The Y-array is 2-dimensional, and contains two rows of points (corresponding to 2 plots). I am currently using an "Ex XY Graph", and am sending the array straight to the Y input. However, the graph only actually displays the first set of points; the second plot is completely ignored. How can I make the graph display the second row of points? I'm using LabView 7. Thanks! -James jmbeck AT vcu DOT edu
×
×
  • Create New...

Important Information

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