Control motor direction using digital control

Dear all,
I am trying to control motor direction (forward and reverse) based on condition. I am reading data from two load cell left and right. 
Currently I am using radio button to control motor direction when stress read from load cell reaches at certain point. For example If I have a fixed cut off value for forward direction +20 as soon the value from load cell reach to value of +20 then motor start moving in another direction (reverse). I tried my best to explain my situation please ask me question if you need further information. I have attached screen shot of my programme. 
Thanks in advance
Tariq
Attachments:
help.PNG ‏147 KB

Hi Supreeth;
Thanks for your reply. I think I solved the bit of problem and use two condition for forward and reverse direction of motors and used and gates to set and rest the conditions. But at one point you can see the broken wire would you please help me with this because error said:
These cannot be wired together because their data types (numeric, string, array, cluster, etc.) do not match. Show the Context Help window to see what data type is required.
The type of the source is 1-D array of
boolean (TRUE or FALSE).
The type of the sink is boolean (TRUE or FALSE).
I add the comments.
Kind Regards
Tariq
Attachments:
help1.png ‏39 KB

Similar Messages

  • Can you control volume without using side controls?

    Can you control the volume without using side controls?

    Or, if your iPad is asleep/locked, double click the home button and you'll get an on-screen volume control and play/pause iPod controls (no need to unlock).

  • Motor direction controlled by Dial control

    how to control the direction of motor by using Dial control,for example, if the pointer locates the negative area, the motor would reverse.  Generally the direction of motor is determined by the values of AIN2 and AIN1 in micro chip, if the value of AIN1 is bigger than that of AIN2, the motor would turn in certain direction, if not, the motor would reverse. However, I want to use only Dial control to control the direction. What should I do?
    Solved!
    Go to Solution.

    Use the comparison function >0.

  • How to use table control in LSMW

    Hello All,
    I have requirement to use LSMW , in my using transaction have table control ,I need to pass values in table control . how to use table control in LSMW .Can any one give me the solution for this.
    Best regards,
    Satya.

    Note: The recording function records a fixed screen sequence. It cannot be used for migrating data containing a variable number of items or for transactions with dynamic screen sequences!
    Tip: It is possible to create a recording via SHDB, generate a program out of this recording, and adopt the program to your needs and registrate the program to be able to use it in LSMW.
    That’s means, for creation of project and WBS Elements is not possible through
    1. LSMW-BDC (For both CJ01 and CJ20n)
    2. LSMW-BAPI (Method: Maintain is not listed )
    3. LSME-Standard Batch Direct Input.
    It’s possible through programmatically(SE38.) either using BAPI Or BDC.
    Thanks,

  • Not able to add taxonomy Control(Activex Control) under Add /remove Custom Controls in infopath 2010

    Hi ,
    Not able to add taxonomy control(activex Control) , under Add/Remove Custom controls in infopath 2010 ..i'm getting the fallowing error ..
    error:This control could not be added through custon control wizard,to use this control go to Controls gallery in home tab.
    Regards
    Giriraj

    Hi,
    I am getting same error while adding contact selector control. And this control is not visilb in controls gallery on home tab. Please help. Thanks!
    Gaurav

  • Is to possible to control a motor by using fuzzy logic toolbox in Labview and motor interfaced with PIC microcontroller

    sir
     I am doing a  PG project on fuzy logic control of robotic arm,In this first i need to write a code in LABVIEW fuzzy toolbox and interface that that code with PIC where motor is connected and a tachogenerator should be connected to motor to send speed to LABVIEW through PIC microcontroller where ADC is inbuilt in it.
    Please help sir me whether  it is possible to do that ,if not tell me do i require any interfacing device  ,I am very new to labview 

    Now for this problem, Fuzzy can be easily used to control the plant. Here is the softwares that would help in this task:
    - LabVIEW Full Development System (FDS) 2009 or later - The is the LV version that allow you accessing the latest Fuzzy Logic develoment
    - LabVIEW PID and Fuzzy Logic Toolkit 2009 - This has PID and Fuzzy Logic functions available for you to develop your controller
    - LabVIEW Control Design and Simulation Module 2009 - This is a complete set of functions that allow you to simulate and develop advanced control applications. In your case, you probably will be using this module for simulation of the DC motor.
    Now, you also will need a way to read the encoder and control the voltage applied to the motor. You have several options from NI for that process. Probably a multi-function Board could help since they have digital counters and Analog Output signals. However, I can't recommend what would be best for this application, but the ideal platform is the CompactRIO platform for your application. They have a Real-Time controller and integrated Input/Output modules with signal conditioning that could allow you to directly drive the DC motor. I would advice to go to our webside (http://www.ni.com/compactrio/) and verify what this platform does. For this platform, you will also need the following sofrware:
    - LabVIEW Real-Time Module 2009 - Allow you to develop you application in Real-Time for deployment.
    Hope this helps.
    Barp - Control and Simulation Group - LabVIEW R&D - National Instruments

  • How can I control a stepper motor drive using a DAQ card?

    I need to control a simple CW/CCW stepper motor drive using a DAQ
    card.  I simply need to output a 5 volt signal and then a drop in
    the signal, and so on 200 times or steps for 1 revolution.  I have
    desiigned the basic program, but do not know how to output the
    appropriate signal.
    Cheers,
    Matt

    What DAQ card do you have? Ideally, one with a counter output to generate the steps, where you can control frequency. If you try to start the motor too fast (acceleration or abrupt application of fast pulses) it may stall out. Search in Help/Search for Examples for 'frequency' and 'pulse' for example of frequency generation. You can also use a digital output on the DAQ card to control direction.
    If DAQ card does not have a counter, you coul do a software timed loop to toggle a digital output to generate the pulse train. It may not be fast enough nor accurate for your application, do not know from info you have given
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    "It’s the questions that drive us.”
    ~~~~~~~~~~~~~~~~~~~~~~~~~~

  • Using a seperate thread to control motors

    Hi am new to Java and am struggling with a probelm.
    The application is to control 4 motors connected to the parallel port. When the user presses a button the motor is set to a certain speed (byte output to port). Once the button is released the port outputs to stop the motors, i also have it working so multiple motors can be driven at the same time (multiple buttons held down) i have the code working ok, but at present the program just outputs a byte of data when its worked out what buttons are pressed/released.
    The problem is i want to drive one of the motors using a crude form of PWM (output an 'on' byte, wait 1 second, output an 'off' byte, wait one second, ect)
    This is clearly going to have to be performed in a loop that is basically an infinite loop untill the key is released. However the program also need to be listening for other key inputs to turn on other motors.
    I think the best way to do it is to create a thread for the PWM that sleeps, allowing the program to do other things, and breaks out when it recieves an interrupt (triggered by another key press), however i am have major difficultly converting the code. at present the code looks like this:
    private void DebugKeyReleased(java.awt.event.KeyEvent evt) {                                 
    int c;
    c = evt.getKeyCode();
    switch (c)
    case 83:     Control(100);
                   break;
         case 68:     Control(80);
                   break;
         case 65:     Control(40);
                   break;
         case 87:     Control(20);
                   break;
    private void DebugKeyPressed(java.awt.event.KeyEvent evt) {                                
    int c;
    c = evt.getKeyCode();
    switch (c)
    case 83:     Control(1);
                   break;
    case 68:     Control(8);
                   break;
    case 65:     Control(4);
                   break;
    case 87:     Control(2);
                   break;
    private void Control(int direction){
    switch (direction)
         case 1:      forwards = 1;
                   break;
         case 100:     forwards = 0;
    break;
         case 2: backwards = 1;
                   break;
         case 20: backwards = 0;
    break;
         case 4:          right = 1;
                   break;
         case 40: right = 0;
    break;
         case 8:          left = 1;
                   break;
         case 80:     left = 0;
    break;
         global_direction = forwards*1+(backwards*2)+(left*8)+(right*4);
    if(global_direction == 0)
    moving = "Stopped";
    short stop = 255;
    lpt.output(Addr,stop);
         else if(global_direction == 1)
    moving = "Backwards";
    short Back = 239;
    lpt.output(Addr,Back);
    ECT, there are alot more if statements that account for all possibilities.
    i want the backwards and forwards cases to enter loops that output data on and off for certain time periods.
    can anybody suggest the best way to convert the code?
    thanks for any info / help
    cheers John

    A finite state machine is an abstraction in which you have a finite collection of states, and a set of transitions between states. One state is active at a time. So a traffic light might have red, green, and yellow states, and transitions between green to yellow, yellow to red, and red to green. There can be multiple transitions out of a single state.
    So for your app, each state might be a kind of signal or a kind of sequences of signals set to the motors, and the transitions would be taken when you need to change the signals. You could send the key events and time events to whatever state currently is active. That active state would then decide what transition to take based on the event.
    I'm sure there will be an entry in Wikipedia about it.
    If the code works, that's great, but (1) it's obviously not working entirely because you're posting here, and (2) code like this can get hairy very fast and thus hard to maintain and thus bug-prone. So if you can simplify it, it will only help.
    If you want to use a thread, you can. You basically have that now. But instead of Thread.interruped as you have it now, you could just have the key press event change the value of the flag to one that will stop the loop.
    (for example, you'd have a "running" boolean field, a "while(running) {" in your run() method, an the event can change the value of "running" from true to false to cause the thread to stop.

  • Want to control the direction of a simple dc motor

    i am using a NI cDAQ 9472 to control the direction of motor with the help of a motor driver L293D by generating a pwm signal. I am able write the code for one direction of the motor, but how to write the code to control both directions of motor

    venky@4 a écrit :
    i am using a NI cDAQ 9472 to control the direction of motor with the help of a motor driver L293D by generating a pwm signal. I am able write the code for one direction of the motor, but how to write the code to control both directions of motor
    You didn't provided much information, we don't know what your code looks like and how you connected the L293D. Typically you would have to reverse to polarity of the outputs feeding the inputs of the L293D (1A, 2A or 3A, 4A).
    Ben64

  • Controlling more than 4 motors simultaneously using 7344

    Is there any way of controlling more than 4 motors by using a multiplexing scheme. or can it be done in any other way.

    The 7344 supports four motors (servo or stepper) simultaneously. As long as you are using stepper motors you could also think of switching the motion signals with an external relay multiplexer to more motors but then the multiplexed motors couldn't run in parallel. Depending on your application this would mean that you would have to switch a lot of signals (step, direction, limit switches, inhibt outputs,...) and I don't think that this would make much sense. With servo motors this approach wouldn't work anyway as the control loop would be interrupted.
    If you want to control more than four motors you better should use another PCI-7340 (2 or 4 axes) or a PCI-7350 (2, 4, 6 or 8 axes).
    Best regards,
    Jochen Klier
    National Instruments Germany

  • Could someone tell me how to control a small dc motor by using labeled and a NI 6008 daq. The motor is adjustable by using a pot that ranges between 0-V if that is of any additional benefit

     Could someone tell me how to control a small dc motor by using labeled and a NI 6008 daq.  The motor is adjustable by using a pot  that ranges between 0-V if that is of any additional benefit.

    Read the second thread you have a link to. While both of these will produce PWM signals, the first one is a couple of orders of magnitude too slow to do anything useful in control the speed of a motor, what you would see would be the motor run at the full speed, then stop for a period, then run at full speed, rather than at the "average of on and off"  as the Pulse Widths will be very long relative to the motor's response. The second one has a better chance, IF all you want to do is run the motor. If there is any other calculations ...   Look at both and try and get an understanding of what they are doing. For PWM speed control of a motor you really need a pretty fast pulse width, and probably some filtering to smooth out the resulting "harsh" waveform, giving you the "average" voltage resulting from the PWM.
    Putnam
    Certified LabVIEW Developer
    Senior Test Engineer
    Currently using LV 6.1-LabVIEW 2012, RT8.5
    LabVIEW Champion

  • Can NI 9474 or NI 9237 be used to control motor pumps

    Hi,
    I am using cDAQ-9172 as
    the data aquisition system and I am planning to control a motor pump to
    run fluids, can modules NI 9474 or NI 9237 be used to control the
    pump?  I know that NI 9505 which is a full H-bridge brushed DC Servo
    Drive Module which can be used to control pumps is not compatible with
    the cDAQ system.  I am very new to this, please help me with it.
    Thanks

    Hi,
    I think some more information about your motor is needed, specific information about what types of control signals it requires along with what voltage it needs as well as current draw/ device name/model number would be helpful.  The NI 9474 can supply 5-30V with a 1A max per channel as can be found in the product manual. Please post back with your motor specs and we will be much better equipped to help.
    JaceD
    Signal Sources Product Support Engineer
    National Instruments

  • When playing a home video DVD using DVD Player I tried to use the "Controls, Use current frame as jacket picture" facility to create a printable image but with no success. Can anybody point me in the right direction?

    When playing a home video DVD (created on my Panasonic DVD/Hard Disc recorder)  using the Mac DVD Player, I tried to use the "Controls, Use current frame as jacket picture" facility to create a printable image but with no success. I assume that any file created by this action would be stored somewhere in a common format but cannot find any such file. Can anybody point me in the right direction?

    Hi Sinious,
    Interesting to know about 10.8 and Flash. I'll hold off upgrading until they work together. Currently using 10.6.8 at home and same on the Universtity's computers.
    Haven't verified on Windows but shall do later in the week if I can get access to a Windows machine.
    Both the Flash player and the Projector come up not full screen, and if I leave it that way then things work OK as long as I don't make the video full screen (using the full screen button on the skin).
    However if I make the swf or projector full-screen (by using CMD-F or the menu option) then when I click on the menu item to take me to the page with the video on it, instead of a page with a smallish video and back button I get a black screen with no obvious controls. If I then press Escape I get my normal screen back and I am in the page that should have the video but there is not video and the back button does not work. So something wierd is going on here.
    If I make a file without any videos with a similar navigation structure everyting works ok except that when I go full screen I lose the finger cursor when I roll over my buttons (which is also wierd).

  • NiMax control of instrumentation using i/o

    Hello everyone
    I must develop an industrial process where a stepper motor moves around orecise positions and, at a given position interval, an air bleed is ejected by a nozzle. The stepper motor motion is under control. I want to connect the nozzle through the plc and control it through the i/o which are found on NiMax. The question is how do i control the i/os?

    Dear Valerio
    Thanks for your reply
    I am aware NiMAX cannot be used to control a process. I am actually interested in how to make the digital i/os switch in the LabVIEW environment at a given time once all the devices are configured in NiMAX. The switch is achieved by changing the state of the digital I/Os. Do I have to use the DAQ assistant to do so? Are there any other methods.
    I have also another question: I am using an SCB 68 to connect the PCI NI 7330 with the air nozzle. How do I make the SCB 68 on NiMax
    Thanks in advance
    Leonardo 

  • Tension control in labview using PCI 7354 Motion Control Board

    I want to make a program for web tension control of roll to roll system in labview using PCI 7354 Motion Control Board. Is there any interface program that can convert my controller output in a format to be directly used as the input of PCI 7354 (Motion Controller Board) for tension control?
    Thank you!

    thanks for your reply, i have already make the code of a straight line move and the motor moves successfully, but know i want to put the H-bridge to be able to make a reverse direction for the motor, for your information i only use a PCI-7340 controller and a UMI-7774, where the controller connected to the UMI-7774, the UMI connected to a PWM circuit and the PWM connected to the DC-motor, so what do you think i can do?

Maybe you are looking for

  • Using environment variable in rule file

    Hi, I want to datacopy from one cube (scenario Forecast) to another (scenario FcstJan, FcstFeb, and so on) based on which month is running currently. I want to use environment variable in the rule file. The Forecast data will be extracted in .txt and

  • What is this talk about iPads malfunctioning?

    my wallet was stolen containing my reciept? What can I do if this happens to mine? When I spend this much money on a product I don't expect this crap. I'm rather frustrated.

  • Url alias for portal

    Hi All, I am new to this portal Can anybody suggest me a way to create alias for my portal. i want to access my portal using <b>http://<servername>:<port>/sapportal</b>         without using <b>http://<servername>:<port>/irj/portal</b> regards, prasa

  • Primavera Expedition Professional 10.0

    This is a printing issue. We have a client that is running Primavera Expedition 10.0 on Sever 2003 with about 5 Win XP workstations setup on a domain. Anyway this is my issue. We run Internet Explorer 6.0 for Primavera due to the incompatibility issu

  • Help importing .mpg files

    I have some videos burned to DVD in the .mpg format. I can play them using VLC but not Quicktime. I would like to imprt them into FCE for further editing but it I keep getting an error message saying "File error: 0 access denied, 1 unknown. "