From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Smart motors program

Hi,

 

This Sam,I am quite new to labview (have been using it for about a week) I have recieve a project for making a program for Smart motors. I was unable to write a program to my smart motors . I have searched this forum and found little tidbits to help me on my way but am now at a bit of a loss as to how to solve my new problem.

What I need to program is: be able to move my motors clockwise direction and anticlockwise direction and if i request to run my motor in forward direction it should run.. I allready program my motor but the only reason is not accurate. The problem of my Smart motors is running but it stops at certain point. My problem is that if I click the button to move the motors to the home position, the button that moves the motors to the 'loading' position no longer works. I want to be able to perform any of the mentioned operations at any point in time (i.e. move back and forth from 'loading' to home) which is not accurate.

The functions i need is: RPM,How many cycle i have run button,counter, torque, which direction my motor is moving, And i need a gage to look for which direction my motor is moving, i need a rotation button which i once hit it should work clockwise and anticlockwise direction.



Also the stop button I have just doesn't work or ends up stopping the entire VI.

As I've said I'm very new to labview and am learning it as I'm trying to program. I have attached the best version of my program for others to look at and give a advice or make some adjustment etc... It would a be a highy appericated.

Thanks

SA

 

0 Kudos
Message 1 of 3
(2,336 Views)

Hello SA,

 

For future reference, asking one specific question in a post tends to get better responses.

 

Unfortunately I cannot follow your code and I am not sure what is wrong.  If you are just getting started with LabVIEW I would suggest that you check out some of our resources online to get a solid understanding of the fundamentals of LabVIEW.

 

Once you have that down, I would take a look at the application design patterns that you can use like the state machine.  By choosing a good design pattern you will keep your code from turning into an unmanageable mess and make things much easier in the long run.

 

And if your program is relying on user inputs to trigger different actions you may want to take a look at the event structure.

 

I hope this helps

 

Justin Parker
National Instruments
Product Support Engineer
0 Kudos
Message 2 of 3
(2,304 Views)

Hi Justin,

 

     Thanks for your response, Actually i got this project last week to create the program for smart motors. In this program i need to add some function like RPM, Mode, Status of the motor, which direction my motor is running, And i need to track the counts of the revelotion,Cycle to run, And i want to see the gage working clockwise and anticlock as per my request to run my motor clockwise or anticlock wise directions, Start and stop button,And you can see 2 buttons (1) Once i hit forward direction button my motor should run forward direction, (2) once i hit 360 rotation button my motor should work back and fourth direction. I already program for this motors. You can see 2 program on a same front panel. The upper program i need to update with some function which i have already placed. And the 2 program which is below one is accurate. If you see my blockdiagram it kind of mess. And you get some kind of idea by seeing my 2 program which is in block diagram.I would highly appericate if you make any change to my program to make my program more accurate. Or you can make changes in my 2 program to add those etc functions that is ( MODE, STATUS, DIRECTION, TOTAL NUMBER OF STEPS, FORWARD DIRECTION BUTTON .The only thing i need a basic program. It will be more appericated.

 

 

Thanks,

SA

0 Kudos
Message 3 of 3
(2,287 Views)