02-12-2009 06:45 AM
Hi,
I am using PCI-7356 motion controller card, built in a PC with LabView RT operating system. I am trying to control a stepper motor which is configured to run in open loop. I have built a program which first loads velocity, then acceleration and finally position. Motion of the motor is started with start motion function. I am controlling a position of drive rod (linear stepper motor) with encoder which is connected directly to encoder inputs of the 7356 controller card. I read a position with “read encoder” function. Control algorithm is written so, that target position (loaded with “load position” function) is all the time compared with current position (from “read encoder position” function). As soon as both positions are equal, I activate stop motion function (with “case” structure). Comparison of both positions is done with “equals function” which is guided in case structure. Problem is that this function is not responding. Either if it is set as decelerate, halt or kill, motor still runs. I have tried to stop motor with setting the speed to 0. Motor still runs. How can I stop the motor? I am trying to build my own control algorithm therefore closed loop control is not suitable for me.
Thank you,
Gregor
02-12-2009 07:03 AM - edited 02-12-2009 07:04 AM
Gregor,
this sounds like a mere programming issue. If you compare two values with the Equal? function, this function only outputs "true", if both values are exactly the same. I know that this sounds trivial, but it's probably the root cause of your problem.
Encoder positions change typically very frequently, at least much faster, than you can read back encoder data from the board. This means, that there is a big chance, that you miss the value that equals to the value to compare with. Instead of using Equal?, you should use Greater?. Of course this means, that you can't meet your stop condition exactly, but this would always be true, if you consider command delays and mechanical inertia.
Could you please provide some more information about your application and what you are trying to accomplish? Maybe I can help you to find a better approach for a solution.
Kind regards,
Jochen Klier
National Instruments
02-24-2009 03:05 AM
Jochen,
Thanks a lot for your response, and sorry for my late answering (I was on vacations). I am trying to build a nano-positioning application with linear PiezoLEGS motors and linear encoders.
Motors can move with speeds of up to 5 [cm/s]. Linear encoder has 163840 increments/centimeter. Frequency on encoder inputs is lower as specified in datasheet for 7356. Motors are acting as stepper motors.
My goal is to prepare some platform which would allow me to implement my own control methods such as fuzzy logic, neural computing… I don’t want to use on board PID regulator therefore I have decided to set up 7356 to work in open loop and built a software control program.
For beginning I have tried to make a simple control algorithm which monitors the current position and stops the motor as soon as it reaches given target position.
What is interesting is that, when I enable home input (with Z signal/index signal from encoder) motor stops. I have tried to do this with maximal motor speed and motor still stops. Although that home inputs are functioning on that way, built-in find reference function does not find reference. To find a reference I have written a special program which reduces motor speed as soon as motor stops (due crossing encoder reference/home input is enabled) and sets the motor movement in opposite direction. On that way I can reach encoder reference within one increment.
I have considered that these functions are too slow for my application. Therefore I have established a real time desktop target. Didn’t bring anything… How can I fasten these functions? Brings what if I write my own dll-s for this functions?
Thanks a lot,
Gregor
02-24-2009
04:32 AM
- last edited on
12-02-2024
03:43 PM
by
Content Cleaner
Gregor,
NI offers a perfect solution for your application, but unfortunately it's not the 7356 board that you are using. The 73xx boards are meant to be used for standard motion control tasks and they do all the control algorithms onboard. The interface to the host-PC is relatively slow, as all host-communication is running in a low-priority process on the 68331 µ-processor on the board. For standard motion control applications this is ok, but it doesn't meet the requirements of your application. Also using a real-time OS on the host-PC doesn't improve the situation.
For customized motion control NI offers the NI SoftMotion Development Module for LabVIEW. The best hardware platform would be a PC or PXI-system running LabVIEW RT and an FPGA-board like the PXI-7813R.
This technology is widely used for customized motion control. E. g. in mobile robotics, piezo control for tunnel raster microscopes, collimator control at the CERN LHC).
Please contact your local NI branch to discuss options how to switch your hardware setup. I'm sorry, but I don't see a reasonable way to use the 7356 for your task.
Kind regards,
Jochen Klier
National Instruments
05-20-2009 07:13 AM
Hi Jochen,
I have finally managed to change PCI -7356 card with PCI-7813R. Datasheet for 7813R says that single output of this card can handle only 5 mA of current. I have digital loads in a range of 15 mA therefore I have to build a simple “power” interface.
I was thinking to use a HEX driver SN7407 which would satisfy my needs, but this chip is already out of the market. Can you please make a suggestion which IC would be suitable for use with PCI7813R card in a way to expand current limits? I know that there is still a chance to build transistor card, which would use transistors as a switches, but I need to expand more as 80 outputs, so it would be easier to have a simple chip to do that.
Thank you,
Gregor
05-20-2009
07:47 AM
- last edited on
02-24-2025
09:04 PM
by
Content Cleaner
Hi Gregor,
unfortunately I'm not focussed on hardware design, so I can't give you recommendations on the chip level. If you are considering also an of-the-shelf-solution, you may look into the R-Series expansion chassis and cRIO I/O modules like the NI 9477. There is a variety of modules available and you could select those that meet your application's requirements.
Kind regards,
Jochen
06-10-2009 09:07 AM
Hi Jochen,
I would only like to inform you that I have finally manage to reconfigure my system on recommended 7813R card. Now I can really see and feel what means custom real time control. J
Although that I have managed to burn all SMD fuses on card (card is very sensible on short circuits against ground) there were no damages to the card. Luckily was replacement of the fusses enough to bring system in life again. (nock, nock) J
Jochen, thank you very much for your help (and hints) with the card. You have helped me very much.
Regards,
Gregor
P.S.: Something went wrong with my nick-name, so now I am using another one. 😉