Jump to content

bono02

Members
  • Posts

    22
  • Joined

  • Last visited

Posts posted by bono02

  1. QUOTE (Ton @ Nov 2 2008, 01:12 AM)

    Hi Ton,

    Thank you for your reply. However, I could not find example in ni.com related to auto-initialize function.

    Could you give me one example?

    Or perhaps what you meant was the create instance function (like constructer in C++) in LV Object Oriented Graphical Programming,

    was this what you mean?

    QUOTE (Ton @ Nov 2 2008, 01:12 AM)

    However I advice you to timed IO within DAQmx, so the timing is handled by the daqmx driver and not by LabVIEW.

    To do this you should create a clock on your 6259 of 5 ms, and do a burst read in LabVIEW of 1 sample, no timing needed the speed will be limited by the DAQ card.

    Did you mean using external trigger? I am not planning to use ext. trigger though, since I desire only to use the source from a single machine.

  2. This is a cross posting, I also posted in here: http://forums.ni.com/ni/board/message?boar...;thread.id=4915

    I hope others LaVa's member could help me faster...

    -----------------

    Hi all,

    I am using LV RT8.5 with 2 PXI installed, the PXI-7358 and DAQmx PXI-6259. I wrote a program in LabView RT of a single timed loop with time constraint 5 ms. The first program, the loop rate was OK (no delay, finished late boolean is false), however, when I added a subVi, suddenly the loop rate became high and delay occured (finished late boolean is true).The delay could reach to 100ms 16x16_smiley-sad.gif

    I attached the pictures below.

    1. The fine loop without subVi

    2. The loop with subVi

    3. The subVi

    What I guess now the problem is because of the DAQmx create virtual channel and DAQmx start. However, If I remove these functions from the subVi, thus I have to connect the DAQmx create virtual channel and DAQmx start in every main program, and thus it will give so much work and make the program more complex.

    Are there any solutions for this. I really appreciate your help.

    Regards,

    Bondhan

  3. QUOTE(ashishuttarwar @ Jan 17 2008, 02:16 AM)

    bono02,

    I think jbelim did a right choice by choosing LabVIEW for this project. LabVIEW is more than just GUI and hardware interface. The NI Vision is full fledge vision analysis toolkit and easy to implement.

    I hope it makes sense and jbelim feels motivated :thumbup:

    -- Ashish

    :thumbup:

    I was not telling matlab is better than LabView :P . Well, in my experience I am coming from asm, C, C++, Matlab then to LabView, though I use several of them at the same time. Anyway, jbelim goodluck for your project. I think Lavag members will kindly help you, as they helped me many times :thumbup:

  4. QUOTE(venkatesh @ Dec 31 2007, 06:38 PM)

    how to make a sinewave generator .whose time period and amplitude should be variable.

    Regards,

    J.Venkatesh

    When we were in high school we have this equation Theta = Amplitude * Sin (2*Freq*Time), here, you can define the time/period and amplitude. If you want to get the speed you can differentiate, also for acceleration.

    Hope it helps.

  5. Hi all,

    I have several problems here, I tried to google but still I could not solve the problem.

    Here are my questions:

    1. I tried to download an example program of EPOS which require to download a DLL file into the RT, but it failed, here's the error (I attached the picture)

    01/02/2008 13:29:50.511 [error] LabVIEW: Failed to load shared library EposCmd.dll:_VCS_GetProtocolStackName@16:C on RT target device.

    From the NI.com forum, I found a similar problem and it said by installing Network Variable Engine and Variable Client Support into the LV-RT, and I did, but still failed.

    Any one can help me about this?

    2. I posted a question also in lavag, I think this section is more appropriate. "I am trying to use the digital IO of the motion controller of 7358, but then I realized the delay is more that 1 ms (I checked using the oscilloscope), I attached the code (MOMO = Must On Must Off). Is this real, I mean the hardware delay between on-off is as big as this? Anyone knows the solution for this?"

    Note: I am using LV-RT 8.5, PXI-7358 Motion Controller, EPOS 70/10

    Thank you for any help

  6. QUOTE(bono02 @ Dec 31 2007, 10:01 PM)

    Hi all, it's me again, don't get bored :rolleyes: . For martin thank you for your reply, I already quite finish the contour movement. I realized that the update rate is the time between two points (Thus we can measure the time for the whole trajectory). For somehow if we set the point too far between two points and the update rate can is beyond the speed, then the motor cannot follow the points given. Now the problem is the speed is too slow (though I am using 10 ms), I am thinking of changing the trajectory.

    Anyway, I have several problems:

    1. I am trying to use the digital IO of the motion controller of 7358, but then I realized the delay is more that 2 ms (I checked using the oscilloscope), I attached the code (MOMO = Must On Must Off). Is this real, I mean the hardware delay between on-of is as big as this? Anyone knows the solution for this?

    2. I am using DAC (I attached the code), I read on the oscilloscope that the signal is not really what I want (I think because of the sampling, I attached the oscilloscope output picture). On the oscilloscope it is read that the amplitude is for 10 V, but in multimeter it is only 2 V (I think because the multimeter measured the RMS value). How to generate a real RMS value using DAC in motion controller?

    All of this code is downloaded into the LV-RT 8.5

    Thank you

    Hi all, I answered my 2nd questions, It is caused by the glitches (see the picture from my previous post). If we use the DAC vi independent from motion axis, we HAVE to disable that axis so that it won't glitch.

    Now about the 1st question, any answer? Thx.

  7. Hi all, it's me again, don't get bored :rolleyes: . For martin thank you for your reply, I already quite finish the contour movement. I realized that the update rate is the time between two points (Thus we can measure the time for the whole trajectory). For somehow if we set the point too far between two points and the update rate can is beyond the speed, then the motor cannot follow the points given. Now the problem is the speed is too slow (though I am using 10 ms), I am thinking of changing the trajectory.

    Anyway, I have several problems:

    1. I am trying to use the digital IO of the motion controller of 7358, but then I realized the delay is more that 1 ms (I checked using the oscilloscope), I attached the code (MOMO = Must On Must Off). Is this real, I mean the hardware delay between on-of is as big as this? Anyone knows the solution for this?

    2. I am using DAC (I attached the code), I read on the oscilloscope that the signal is not really what I want (I think because of the sampling, I attached the oscilloscope output picture). On the oscilloscope it is read that the amplitude is for 10 V, but in multimeter it is only 2 V (I think because the multimeter measured the RMS value). How to generate a real RMS value using DAC in motion controller?

    All of this code is downloaded into the LV-RT 8.5

    Thank you

  8. Hi martin,

    Thank you for your answer. I tried several times, but the motor only moved a bit.

    I tried these steps (stepper motor) with absolute contouring: 1000 2000 3000 4000 5000

    with velocity 137795 steps/rev equal to 13 RPS

    I don't know why. I think this is the fastest speed of the motor, because if you increase

    the speed the motor will not move anymore.

    I read in the manual that "no consecutive points can differ by more than 2^15-1", and my steps

    are just fine, and also it said that the data in-between two points will be spline-interpolated.

    Is it possible to have a position (a b c d e..n) and then just by giving the time from a to n (with the velocity is derived automatically)?

    Btw, about the maxon motor, are you using the API provided or you directly drive it using motion controller?

    Here with me I have EPOS 70/10 and Maxon motor EC 45.

    Thank you.

    Bondhan

    QUOTE(martin@aerodynamics @ Nov 28 2007, 12:26 AM)

    There are two contouring modes: Absolute contouring and relative contouring....

    http://digital.ni.com/public.nsf/allkb/062...6256C8C00771B57

    Just try on NI.com search for contouring

    In the contouring modes you write the desired positions into a buffer on the motion controller. Typically you give the motion controller every 10ms a new position.

    In the absolute contouring mode you write absolute positions:

    If you write 100, the motor will turn to 100 Inc, if you write 200 the motor will turn to 200 Inc....

    When you start a new absolute contouring move, the counter will always start at 0! (Not the same as the Absolute Inc. position...)

    In the relative countouring mode, you write relative positions to the motion controller.

    If you write 100, the Motor will turn 100 Inc starting from the actual position. if you write 200, the motor will turn another 200 Inc starting friom the actal position...

    So if you will move from 0 to 100Inc. at different speeds:

    Absolute contouring:

    Write 0, 1, 2, 3, ...... 99, 100,...100

    Write 0, 2, 4, 6, .......98, 100,...100 (double speed)

    Write 0, 0, 1, 1, 2, 2,.... 99, 99, 100,...100 (halve speed and so on)

    Relative contouring:

    Write 100 Times a 1, (followed by zeros)

    Write 50 Times a 2 (double speed) (followed by zeros)

    Write 100 Times a 0 and 1 (halve speed) (followed by zeros)

    So with the update rate and the values you write to the buffer you will give the motion controller the desired speed.

  9. QUOTE(Daklu @ Nov 22 2007, 04:59 AM)

    1. Block diagram zooming. I brought this up with an NI rep at a conference and the response I received was (to paraphrase), "We don't want people to create block diagrams more than one screen size." Bleh. Forcing the customer to adhere to your preconceived notions of coding style is a bad idea. Imagine if Visual Studio only allowed 25 lines in each code module because "functions should never be longer than one screen." What would happen? Aside from mass migration to other programming environments people would cram more code onto each line. Goodbye readability.
      Being able to zoom out to get a complete view of the block diagram is important for me to get a better understanding of what is happening. Yes, BDs *shouldn't* be larger than one screen, but sometimes they are. (We have one engineer who has dual 30" monitors at his desk. His vi's aren't larger than his screen, but they are certainly larger than mine!) I have also found that trying to limit the size of my block diagram actually makes it harder to follow. I squeeze wires and objects closer together in an attempt to make use of the limited space. Being able to zoom out would relieve me of the need to pack everything in. I could layout my objects in a way that is logical and allow more whitespace to ease reading.
    2. Integrated Development Environment. This is another request I made to the NI rep. He had an answer that sounded reasonable but I forgot what it is. The fact that fulfilling the wish is impossible doesn't stop me from requesting it. (Yes, please move that mountain 2 miles south so I have a better view of it.) Labview windows all over the place drives me absolutely nuts. I connect my laptop to multiple monitors at home and at work; it is not uncommon for me to open a vi and have the window be located completely off the screen!
      I might have 8-12 block diagrams (and by extension, front panels) open at any one time. Throw in additional windows for pallettes and contextual help and I feel like I'm stuck in 1995 coding in VB5. Labview really needs an IDE with dockable toolbars, tabbed code windows, etc.
    3. Front panel auto-home. The front panel has a home location indicated by the large dot on the grid. Sometimes front panel objects get shuffled around such that the home location is either covered by an object or way off the screen somewhere. How about an easy way to automatically return the home location to the top left corner of the FP window?

    "We don't want people to create block diagrams more than one screen size." :blink:

    I agree with you, zooming would be better. It's painful by dragging the slider right and bottom, also by using navigation window, we still have to click on that

    small window, a shortcut would be better!

    For writing comment I usually did shift+right click, and choose the Text icon (I think this is a standard one), why do you need string constant?

    Also the front panel, sometimes in the Back Panel I create a ctrl or indicator, then when I switch to FP, I have to -again- drag the slider to find the control/indicator

    which has been created

    And another one, for XP user maybe you can consider of installing a free add-on from Windows, http://www.microsoft.com/windowsxp/downloads/powertoys/xppowertoys.mspx' target="_blank">Powertoy the alt-tab replacement, you can click on the small-screen when you are switching window using alt-tab.

    Bondhan

    ~Another Certified LabView Newbie

  10. QUOTE(martin@aerodynamics @ Nov 20 2007, 08:11 PM)

    This depends on your application, I can not say if 3600 are just fine or not...

    The motion controller (MC) makes a 4 x of your encoder pulses. (If you have a A and B signal)

    That mean if you have 3600 counts per revolution, the MC will use 14'400 steps per revolution...

    I use encoders from 500 to 10'000 pulses per revolution...

    So you have to calculate the resolution you would like to have and then you can choose the right encoder.

    We usually use an absolute and an incremental encoder for all axes, since we then don't have to make reference moves...

    Hi Martin,

    I need another help. I tried to find a contour move with different speed configuration in ni.com, but I could not find any.

    Is it possible to have different speed for different position in countour move? Do you have example for this?

    Thank you.

    Bondhan

  11. QUOTE(martin@aerodynamics @ Nov 20 2007, 08:11 PM)

    This depends on your application, I can not say if 3600 are just fine or not...

    The motion controller (MC) makes a 4 x of your encoder pulses. (If you have a A and B signal)

    That mean if you have 3600 counts per revolution, the MC will use 14'400 steps per revolution...

    I use encoders from 500 to 10'000 pulses per revolution...

    So you have to calculate the resolution you would like to have and then you can choose the right encoder.

    We usually use an absolute and an incremental encoder for all axes, since we then don't have to make reference moves...

    Hi Martin,

    I need another help. I tried to find a contour move with different speed configuration in ni.com, but I could not find any.

    Is it possible to have different speed for different position in countour move? Do you have example for this?

    Thank you.

    Bondhan

  12. QUOTE(martin@aerodynamics @ Nov 20 2007, 08:11 PM)

    This depends on your application, I can not say if 3600 are just fine or not...

    The motion controller (MC) makes a 4 x of your encoder pulses. (If you have a A and B signal)

    That mean if you have 3600 counts per revolution, the MC will use 14'400 steps per revolution...

    I use encoders from 500 to 10'000 pulses per revolution...

    So you have to calculate the resolution you would like to have and then you can choose the right encoder.

    We usually use an absolute and an incremental encoder for all axes, since we then don't have to make reference moves...

    Hi,

    Can you explain why the MC will multiply with 4? Where can I get this information? in which manual?

    Btw, the encoder is going to be used for servo motor. For the stepper I have potentiometer feedback.

    Thx

  13. QUOTE(martin@aerodynamics @ Nov 13 2007, 04:07 PM)

    Hello

    I'm using the PXI 7358- 8 Axis Motion Controller for Servo Motors, and Hydralic Cylinders...

    I also use the EPOS Positioning Controller from MAXON Motor...

    What do you like to hear about the Motion Controllers?

    Martin

    Hi Martin,

    I noticed there are several replies, I appreciate it to Jason and Mike. I will come back later with bunch of questions. :)

    I am planning of buying a rotary encoder, there are two type incremental and absolute. I have understood the difference between

    both, and It seems that incremental is suitable to be used with motion controller.

    I am thinking of buying incremental, with 3600 resolution, line driver type. I read that the motion

    controller can distinguish a signal with 100ns width. What do you think about it, is it good enough?

    Thank you

    Bondhan

  14. QUOTE(Neville D @ Nov 14 2007, 02:59 AM)

    Try a manual reboot of the PXI system.

    Are you sure you are not in safe mode? (there is a dip switch on the controller to set it in safe mode, if you haven't changed it, then it probably is NOT in safe mode).

    Connect a monitor to the PXI controller and see what error messages if any are displayed on it.

    Try removing the other modules (except controller) from the chassis and seeing if error messages disappear or behaviour changes.

    If still nothing then follow instructions to re-install the software by putting in safe mode. These should be in the manual for your controller.

    Neville.

    Hi Neville, thank you for your response. I can switch to the Safe Mode using the BIOS configuration, there are three options: WINDOWS/Other OS, LABVIEW RT, LABVIEW RT Safe Mode.

    I have dual monitor, so I can switch directly. I tried your suggestion, the device in the target still did not apper in MAX, and btw, I only have one card installed PXI-7358.

    I remove the installed software on my remote target, and then installed again, rebooted. But still the device in the target did not appear T_T

    Anyway, is it possible for my machine to be used as RT target, the PXI-1042 (chassis) with PXI-8106 Embedded Controller?? Or is it should be PXI-RT controller?

  15. QUOTE(Norm Kirchner @ Nov 13 2007, 12:38 AM)

    bono, depending on what your cost constraints are, and since time is short, and since you're new to LV, and since you're going to be getting into Real-Time hardware. I would strongly recommend finding an alliance partner in your area to help you get started on this. To give you a framework, a background and some idea how to properly code this up.

    RT is not a simple task to program properly, especially with the motion control, and w/ the expectation of accuracy and precision. I don't know how much you figured you could learn and implement in a short time, but it looks like you might be over your head.

    Your project seems really interesting and my true intent is to help you succeed, not be mean.

    Time to call in the Marines.

    Hi Norm,

    Thank you for your response, here in my place I think it is difficult to find partner. And also I'm living in small town, the NI office is 4 hours from here :(, and AFAIK I am single fighter NI user in this Univ. Btw, also there's one problem which is language.

  16. Hi all,

    I just got the LV-RT add on, I am using 8.2.1 version. Here's what happened:

    - I have a target PXI-1042 (chassis) with PXI-8106 Embedded Controller, and one motion controller PXI-7358 is installed! And host, Intel Pentium Duo Core with high spec.

    - I followed the instructions , I have installed the LV and LV-RT to both, my PC and the PXI controller

    - Then, I booted with the PXI embedded controller, chose to boot from LV-RT in the BIOS, then I managed to set the IP address in the target, and also I

    successfully install the driver/software from the host to RT-Target (my PXI)

    - When I was about to do the next step which was to configure the device in MAX, I failed. The MAX seemed can not read the devices which are installed

    in my PXI target system :(

    I have searched in ni.com, looking around the RT thread but no-one seemed to have same problem with me :(

    FYI, I have installed the driver for the motion controller, which I can write and run a program for this controller.

    Do you know how to solve this problem? Thank you

  17. Hi Jason,QUOTE

    You mean there's another one somewhere?
    Yes, there is. I read one thread in this forum, and he was writing about his code which using local variable and getting bigger and bigger ;)QUOTE

    I hate state machines. Sometimes they are necessary, but most of the time they are not.I do like a producer-consumer architecture for handling events. Events, UI or programmatic, can happen at any time, and you need to handle them promptly (less than 1/4 sec) so that your user feedback is snappy. However the part of your code which actually gets stuff done is often slow (more than 1 sec, often way more), so you need to let those operations run their course , undisturbed, in some kind of dataflow VI.

    Can you explain more about this? I am planning to move to LabVIEW real-time, it said that the loop can provide to 1us. I don't have the RT now, maybe this week we're buying. Anyway, can you give me more literature about producer consumer architecture?QUOTE

    I like to use notifiers to send progress updates and results back from the operational code to the presentation layer. However if you are brand-new to LabVIEW, feel free to ignore all of that and show your results right on the operational VIs.

    Did you create a user event for passing message from both layers? What do you think about the performance?QUOTE

    I don't use UML, I don't design on paper first, and I don't start by roughing out the GUI. Those are worthy techniques, but I like to do a bottom-up design. Code up all of your functionality one VI at a time, and stick to one piece of I/O at a time. If you need to read and write from files, write a VI for each of those. If your motion control moves in a straight line, write a VI to do that and one to monitor your motion status until it is complete. If you are looking for the limit switch, write a VI to detect that, and then another one to wait for the limit switch with a timeout function. Then put those together for whatever complex motion/measurement function you are trying to achieve. If you use the RS232 port, make a VI for each message you send and including a check for errors or return messages in that VI.

    I learned from s/w engineering lecture, design is the most important part! I agree with this, but I have to race with the small time that I have. I am also not used to design everything in detail, just small chunk of algorithm, I usually write down first on paper, it helps me to write the code faster. But, I used to do same things like you, do all the interface with the hardware, and then coming to the higher level. I did that when I wrote a program for my mobile robot in undergraduate. My major was electrical engineer, so I have to code everything which connects to the hardware, small pieces of code. The computer science student will use that functions to create higher level code (like AI).QUOTE

    As a C programmer, you have one file for each module, but remember, LabVIEW is one file per function, which is one layer down. You have to resist the temptation to stuff lots of functionality into each VI, and don't be put off by having to make an icon and a terminal pane for each function. It just doesn't take that long. Don't let any of the diagrams get too big or to have too many structures: While, For, Case, Sequence, etc. If you have more than 3 structures in a VI, you should think about why you are trying to do so much and consider making each structure the basis of a new VI. If you are doing motion control and anything else interesting, and following my advice, you should end up with between 20 and 100 VIs. Keep them organized and give them all sensible names so you can find them.

    Ok, here we also have NI-Elvis. Not me is using it, but my friend. He's teaching undergraduate students. He told me that Elvis is too slow, too many top-level VI which slow the flow of the program. From your experience, what is the maximum level for a sub-VI should be?QUOTE

    OK, I'm done for now. Good luck!Jason Dunham

    Thank you Jason. Bondhan Novandy~Finding more literature of Prod/Cons in GoogleQUOTE(mross @ Nov 12 2007, 02:30 PM)

    Greetings,Mike

    Thank you for your reply Mike, 1 & 2) I mentioned about the actuators (stepper, servo and BLDC) just to show that I am going to design a quite big program, which needs precise control. Today, I managed to control the stepper motor (linear-actuator) with potentiometer feedback (separately though). I'd love to solve a problem by my own, but when I am stuck I will definitely go to forum and ask questions. This is what I have done, I have read the tutorial/webcast, ebook about FSM, even this mentioned that it is the best solution rather than using UML design (as far as I understand). I have tried the LV FSM toolkit, but for me I don't like it, I can not read the program clearly (maybe because it is using stacked sequence).I am afraid that once I code, a single small changes will ruin everything. In C it was easy, you can insert any code in any line you want, but in LabView I feel it is a little bit difficult. Thank you for your suggestion, I will try to use the producer/consumer coding technique smile.gif 3) Thank, I am using two monitors now thumbup1.gif , though I connect to the PXI controller using remote desktop! But still zoom in/out function I think is more comfortable, hehe.. 4) Ok. Thx.Note:Why my reply always ending up and merge with my reply to Jason?

  18. Hi all,

    I am new to this forum, I hope I do not post on a wrong category. As a newbie in LabVIEW, I have several questions:

    1. What is the best or most comfortable coding technique in LabView, I heard there are several choices like FSM, Producer Consumer, State Chart, so on? I am confused which one I should choose. FYI, I am going to control using motion controller PXI 7358 4 stepper motors, 1 servo, F/T Sensor and 1 BLDC maxon motor.

    2. What do you usually do when designing a huge program (single programmer?), do you design using UML or something similar to that? Choosing wrong coding technique -for me- means that unreadable code, and uncomfortable huge program layout in the screen :(

    3. Why there is no zoom in/out option in LabVIEW? Why the LabVIEW designers do not provide that?

    4. Any body here is using PXI 735x? I searched in this forum, I found only several topics regarding this. I hope we could share knowledge and idea about the motion controller.

    Your response is really appreciated.

    Bondhan

    ~Another C programmer who move to LabVIEW

    http://bono02.wordpress.com/

×
×
  • Create New...

Important Information

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