Jump to content

James McAnanama

Members
  • Content Count

    46
  • Joined

  • Last visited

    Never

Community Reputation

0

About James McAnanama

  • Rank
    More Active
  1. Greetings, Does anyone have recommendations on a vendor for flow transducers to measure ATF/hydraulic fluid? Volume is ~20L/min (3000psi max). I am looking for a robust product that can take being bounced about. Regards, James
  2. Sorry Zeus, I do not understand. You write in English far better than I could write in Portuguese or Spanish! However, your problem is still unclear to me. I do not understand the following: "what I am trying to make I am while the program wheel and I to want to increase the rotation of the stepmotor I I obtain without having that it program and to place a new speed and to twirl again" Can you reword the above statement (maybe I will be able to better understand). Also, perhaps it would be better if I knew where you were having trouble. Are you having trouble with LabView, or are you having trouble with the 3540i board?
  3. Zeus, If I understand correctly, you want to be able to send updates to your motor indexer without stopping & starting your program? What I think would help is to divide your program into multiple processes. One process would be responsible for motor communications, while another would be responsible for getting commands from a user interface. You could use a queue to pass messages between the different parts of your program. I have attached a trivial example where a que is used to update indicators on the screen. One process sends commands to update a binary counter, while another process responds to the user request to turn on and off a LED. A main process monitors the queue and reacts to new commands. Let me know if this helps, or let me know if your problem is different than I understand it to be. Regards, James Download File:post-365-1105458512.llb
  4. andgan, If your camera has a composite video output, you can get the image into LV using a frame grabber (but that will still require $$$). Maybe someone else can come up with a cheaper solution... At any rate, if you can figure out how get the images into memory, the edge detection can be done by creating your own algos. A simple approach is as follows: get the region of interest of your image and populate a 2-d array with the grayscale pixel values. Create a histogram of the image and look at the difference between the dark region and light region. If there is >20% difference between these two regions, then edge detection should be easy & robust. If you lack this contrast, try playing with the lighting. Now binerize the image by select a threshold roughly halfway between the dark and light grayscale values (i.e. all pixels < threshold =0, all pixels > threshold =1). If your edge runs top-to-bottom, sum all columns into a 1-d array, and take the maximum of the derivative as the location of the edge. If your edge runs left-to-right, sum all rows and look for the max in the derivative. If your edge can have any orientation, then you will have to look for the transition from light to dark in each row, and then do a linear fit to the result to figure out location and angle. Once you calibrate your camera to some real world dimensions you can express the location of the edge in these real world terms. Cheers, James [EDIT] PS> If you find you require an industrial solution, you might want to take a look at DVT - their total cost of ownership is lower than most for the quality of the product IMHO. I have no vested interest in the company - I just like their product. You would be looking at a few thousand bucks. [\EDIT]
  5. Congratulations Didier! I hope you have filled up on 'tea and dessert' - your probably going to be too busy for the next 18 yrs! :laugh:
  6. Has anyone played around with the "Diagram Disable Structure"? You can create this struct using the New VI Object primitive. Create it in a target vi (vi cannot be running to create), then copy it to your application. You can 'comment out' code, or add several flavours of a code snippet, and disable all but one version of it. Is this the same as the 'conditional disable struct' in the sense that it is only supported on the PDA version?
  7. You should consider logging to an SQL database. MySQL is very powerful and you can't beat the cost. You could log your status and define another column in the db table as a timestamp. Every time you write a status message, the timestamp gets added for free. You can access the db remotely, and can of course query it for specific message etc. Once you start using a SQL db, I believe you will find more and more uses for it. :2cents: James
  8. Does anyone know how to add a shift register to a For Loop using the scripting features? I want to programmatically create a new For Loop on a specified block diagram, and then I want to add a shift register. Cheers, James [EDIT] Okay, never mind, I got it.... Invoke node on Loop, select method="add shift register". Huh, go figure... I'm glad I spent so much time trying to get the New VI Object primative to do this for me! :-( :headbang: stupid :headbang: stupid :headbang: stupid! [/EDIT]
  9. You will have to add some logic to the queue handling - if you pull data from the queue, then it is gone! You will have to control which reads are destructive, and which are not.
  10. Ruben, If you need torque at high speed, then servo is better than step. However, in your case I suspect you want torque at lower speeds, and holding torque, so a stepper motor is a better choice. You do not need an encoder for a stepper motor. Stepper motors have a typical resolution of 1.8deg per step, but can obtain better resolution using 'microstepping'. You can use an encoder if you want (if you overpower the stepper motor during a move, it stalls loses track of its position) but typically it is not necessary for a properly designed system. In terms of control, your system will consist of the following: -motor -amplifier (converts logic volts to motor volts & current) -indexer (takes commands from your software and translates them to meaningful pulses for your motor). -limit switches, EPO, other inputs. I use delta tau indexers and Compumotor amps and motors. That is, I don't have experience with NI's equipment, but it looks like they have user friendly equipment that should handle your needs.
  11. I recommend picking up a book: Conway & Watts, " A Software Engineering Approach to LabVIEW" ISBN 0-13-009365-3. The book describes more advanced usage of queues. For example, sending a cluster as the queue type. In this cluster you have a component (e.g. a string) describing the intent of the message, or who should use the message, a component that is the command to execute (e.g. clear, run, stop, etc), and a component that contains any numerical setting required by the command. I think this approach would help in your client<->server communications. The client would send a formatted message over TCP/IP to the server, the server would then submit this to a queue for the rest of its application. Everything from adjusting PID gains to controlling data in memory could thus be administered remotely. Good luck, James
  12. I think what you want to do is use a named queue. In your data acquisition process, you will populate this queue with your data. The application that runs your data acquisition process must also launch the TCP server. For each instance of your reentrant server you will access this named queue and will send the data down the tcp port to your client. You will need to add some two-way communication between your client and the server to tell the server when to flush the queue. You could even add the capability for each client to broadcast messages to each other by writing and reading a separate queue on the server. Keep in mind that the clients cannot see the queue directly (only the server PC has access to the queue -it adds data, removes data, and can then transmit this data back to the clients). I have attached an example - A VERY QUICKLY WRITTEN EXAMPLE - to get the idea across. Launch the Number Generation vi in the llb. Next launch the client vi (these vi's are all modifications from Michael's example 4 - I hope that is okay Michael). Basically the number generation vi launches the server and then enters a while loop where it continually adds random numbers to a named queue. When the client vi makes a connection, the server reads the entire contents of the queue, deliminates each reading with a pipe (|) and sends this deliminated string to your client. Notice that the data is added to the queue faster than it is read (i.e. no loss of data). Keep in mind that nothing removes data from the queue at this point - you will have to add that feature. If you were to make another connection, you will get all of the data from the start of the process. You can break the string into the numbers by using the pipe (|) as your deliminator. Okay, I hope this helps - I haven't spent a lot of time on it, so I am sorry if I have missed something - let me know. Cheers James Download File:post-365-1097178076.llb Remember :beer: doesn't keep you warm at night, but LV sure does.... was that out loud?
  13. Paulo, I don't know the details of your application, but based on the fact that you have one server and many clients, and the fact that you want to keep all data, I am thinking that you are using your DAQ vi as a data logger and the client vi's as remote analysis tools(?). If this is the case, perhaps you should use an SQL database. The DAQ vi would insert the data to the database, and the client apps would pull from the database. This way the DAQ vi doesn't have to keep track of what data is still pending transmission, the data is not volatile (lost in power outage etc) , large amounts of data are easily handled, and the SQL data can be accessed remotely by everything from LabView to Excel to web pages. :2cents: James
  14. You are from Pickering eh? I don't suppose you are running v2.2 at that there nuclear plant are you?
  15. Hey Paulo, Another suggestion might be to use DataSockets. Your server is a datasocket writer, and your clients are datasocket readers. DataSockets are abstract enough that you don't have to worry about handling multiple connections - you just subscribe to the url of the data source and read when ready (or read, waiting for data). See LV examples. If you like the TCP/IP approach, then I believe Jean-Pierre's suggestions are best. Cheers, James
×
×
  • Create New...

Important Information

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