Jump to content

Francois Normandin

Members
  • Posts

    1,209
  • Joined

  • Last visited

  • Days Won

    47

Posts posted by Francois Normandin

  1. QUOTE (ASTDan @ Feb 23 2009, 05:06 PM)

    I opened the VI and I see the Phi Symbol

    Why does that work?

    Dan

    It did on my system, but if you change the font size and add a roman letter to the same text strip (say phi + f), you'll mess it up (XP, 8.6) and get something similar to pdc's odd characters.

    If you don't need to change it programmatically, I would suggest you use a picture of Phi instead of string... I've fought with them in LV7 and gave up.

  2. QUOTE (menghuihantang @ Feb 12 2009, 04:00 PM)

    Thanks much, everybody. I tried a few times again after reading through you guys' comments. It's not done yet, but at least I got somewhere. Labview doesn't crash now after I changed to "Pass by pointer", and I got a return value '205' which according to the DLL documentation is a DLL problem.

    Anyway, one problem solved. But it raised another question. I don't know VB, but How do you tell whether should use passbyvalue or passbyreference given a prototype of VB function, like this one, "function DESKWINReset(var ComPort, TC, Mode: Integer): byte". It says nothing that those three integers inputs are pointers.

    You might need to call other functions to fill in some data in memory first and then call your DeskWinReset function with the pointers to those values. ComPort, TC and Mode are not data by themselves. Pointer being a reference to an existing data in memory, if DeskWinReset expects to find a certain data structure at pointer value ComPort but what it finds is random 0's and 1's, then you will most probably get an unexpected result.

    For example, on Windows systems, there is a call to retreive the last error code. There is an other function to generate in memory a string for this error code. The output of this second function is a pointer that needs to be passed to a third function to display the message. You don't give the whole message as input for this last function, just the pointer to the string in memory. If the memory block is not initialized, you'll get an error.

    I think you should check what's the structure of data at ComPort's pointer location. Is it a pointer to a string, a boolean, an integer, a cluster structure? Some functions can be tested by inputing null values instead of actual pointer values. A null is generally represented by "0" for integers (not always). Have you tried 0's? Do you get the same 205 return value?

    EDIT: I see you input I32's. Does it work with U8? (It probably makes no difference, but Byte is U8...)

  3. QUOTE (Vende @ Feb 12 2009, 10:31 AM)

    So does if I understand you well, it means I can not see this camera in MAX Interfaces and Devices and after change yes. How to do this change? I have not foud any possibility of drivers' change, only when a device is detected. Thanks!

    In my experience, I always saw the pixelink cameras in MAX, I just needed to change drivers.

    Have you installed IMAQ? I'm not sure you can see the cameras in MAX without IMAQ installed.

  4. QUOTE (Vende @ Feb 12 2009, 09:21 AM)

    You are right, it was the first thing I have tried, but I can not find this camera in MAX so I asked about possibility to use it in Labview and its compatibility. How to continue in this case?

    In MAX, you have to change drivers. Pixelink cameras automatically install with the factory drivers and MAX doesn't recognize it. Change the settings in MAX and you'll be able to detect it.

  5. I would suggest you take a look at the L298HN chip. It's cheap and it's a dual H-Bridge configuration. You can control a stepper motor (4,6 or 8 wires) with 2 DO (A and B) or 4 DO (A, /A, B, /B) for full-step and half-step modes. There are examples on the web on how to do this. (I don't have time to give you a link, but just google it. ;) )

  6. QUOTE (Vende @ Feb 10 2009, 09:56 AM)

    How it is with Pixelink A622? This camera is not compatible with Labview, but I have found some information about Pixelink own software called SDK that is able to create communication files for labview. Does anybody have some experience with this? Now the pixelink website is not accessable.

    Pixelink SDK contains LabVIEW drivers. The learning curve is steep if you want to customize but once you get it, I found it efficient. (I used it with A742)

    The driver comes with a grabber program that you can use almost out of the box.

  7. I ran into the same problem this morning and I investigated the "Get Last Event" Method for the image control. I need to poll repeatedly to get the last event fired (but at 25Hz I don't think I'll have a problem for user clicking too fast!).

    I monitor the "Draw Event". The method returns the tool used (rectangle, circle, etc.) and the coordinates.

    If you don't use it to actually allow the user to DRAW something, then I think it could work for you.

    post-10515-1234281573.png?width=400

  8. QUOTE (rom76 @ Feb 10 2009, 09:33 AM)

    Dear members of the forum,

    I faced a problem where i need for example to register the time of outgoing message as well incoming messages, What is the method that can be used to accomplish this task? Thank you in advance for all your help.

    Regards,R

    I'd simply build a cluster with two elements: time stamp and message string. Your VIs could always communicate with this structure where the time would be filled in by the VI that sends the message. The receiver would thus know when the message was sent. Then, what you do with this information (display, log to file, ...) is application specific.

  9. Your front panel is set to lock until an event as finished.

    Uncheck the box at the bottom of your Event edition page. This is a useful feature when you want to prevent the user to perform any tasks while one completes, but in your case it's the reason why your panel is locked.

    But I agree with Mark that you should rethink your program to have only one event case. I'd suggest three loops: 1- Event case for UI, 2- Camera and 3 - Motor.

    This way you can act on your motor and camera via Queues or any other means of communicating between loops that you see fit. Your UI event case would thus be perfectly fit to be locked while you react to a user command, and your motor/camera will be separated.

  10. QUOTE (bmoyer @ Feb 4 2009, 08:00 AM)

    You may want to do a test to see if it is acquiring the same image more than 1 time. I thought this is the way that it worked - if a new image is not available since the last time, to just return the same image. But I could be wrong or this functionality could have changed at some point.

    It's probably worth comparing the Acquired Buffer Number output of the IMAQ Grab Acquire.vi to the previous iteration (using a shift register in a while loop) to make sure this isn't the case (at least in your test code).

    Bruce

    That was my hunch as well and I did see the buffer number was not rising as fast as the loop rate.

    Although this implementation demonstrates that it's not limited by speed, either writing to disk or data processing.

    Many cameras can't deliver 30fps at full resolution (1280 x 1024 for example). The next question I'd ask myself is: What's the camera's model? Can it run at 15fps at full ROI?

  11. QUOTE (pwu.380 @ Feb 3 2009, 04:12 PM)

    Any explanation as to why this happens or is it one of those "just because" kind of things?

    I don't have a real intelligent answer for you, as I haven't really asked myself the question. But the help file says this:

    Immediate? determines if the system returns the image currently being acquired or the last completely acquired image. The default value if FALSE, which causes NI-IMAQ to wait until the current image is completely acquired before returning the image. TRUE returns the next acquired image

    That explains why it's faster, but not why it's five times faster... I would have guessed that the maximum delay between true and false would have been the duration of one frame, hence I would have expected at most a two-fold increase in speed. Since it's much faster, there must be other considerations. Perhaps someone else has a better description of what it actually does...

  12. QUOTE (Nikunj @ Feb 3 2009, 09:28 AM)

    So, inshort i want to ask that how to put that conditions at the start of vi..

    Hi Nikunj,

    for default conditions at start of VI, you can either make values default (simplest, but likely not ideal for hardware) or you could save your conditions in an initialization file and load them before any other tasks performed by your program.

  13. QUOTE (Maca @ Jan 30 2009, 08:56 PM)

    A *.m file is a MATLAB script file, while they can contain data as well, they typically are not used for storing large data sets.

    Actually, a .mat file is a binary file for data. .m files are scripts. .mex files are the ones, from what I understand, that emulate VIs.

×
×
  • Create New...

Important Information

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