From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

Using a pattern to generate a continuous signal

I am trying to control a stepper motor connected to an NI drive using Labview 8.5. I need to control the motor in both directions and be able to set the acceleration time, deceleration time, rpm CW and CCW. The variables in CW and CCW can be different. I tried using a combination of four ramp patterns to control my variables within a while loop so the pattern would continuously be generated. I combined the four ramp patterns in an array and used waveform builder to put them into a waveform (and I sat the dt based on the the acceleration and deceleration times). However, I cannot get the motor to start running. I know the motor is connected and running with my program because I can can just set an integral value for the RPM and be able to control it while running my program, and it works just fine. However, I cannot get it to work when I use my pattern. I am wondering what might be the problem. I have tried plotting my waveform, but it does not look like it continuously get generated, it seems like the pattern just "spit" all the numbers and they all get read at the same time. The motor is not doing anything.
My question is, what am I doing wrong? Also, is there a ready function that I can use to generate an asymmetric triangular signal?

 

Thank you, and I would really appreciate any help. 

0 Kudos
Message 1 of 7
(3,011 Views)

We don't know anything about the hardware use and only have a vague description of your code. Don't expect any useful help if you don't attach your vi.

 

Ben64

0 Kudos
Message 2 of 7
(2,982 Views)

@ben64 wrote:

We don't know anything about the hardware use and only have a vague description of your code. Don't expect any useful help if you don't attach your vi.

 


I emphasized "VI" -- whatever you attach, we must be able to (a) edit it, (b) inspect all of it (the whole VI, including all the Case examples), and (c) potentially execute it.  If there are a lot of sub-VIs, compress the Folder containing the Project (you are using Project, I hope) and attach the resulting .ZIP file.

 

Bob Schor

0 Kudos
Message 3 of 7
(2,914 Views)

Thank you for your responses. Sorry for not including the VI initially, I am attaching it here. I using a NI MID-7602 driver to control a stepper motor. I think I am not using the ramp pattern in a correct way. I know that the hardware is working fine and the control part of the VI is working fine too because I tried using a sin waveform to control the motor and it worked just fine.
I have been only learning and using Labview for less than a week so the answer might be trivial.

 

Thank you!

0 Kudos
Message 4 of 7
(2,903 Views)

Do you have any suggestions? I have attached my VI on a previous post.

 

Thank you!

0 Kudos
Message 5 of 7
(2,843 Views)

I figured out how to do it!

0 Kudos
Message 6 of 7
(2,693 Views)

Hi Saleh,

 

do you really think the solution to your question is "I figured it out!"?

 

Please provide your solution so others with similar problems might learn from. (That's how this forum works in general!)

Or remove this "solution" mark…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 7
(2,683 Views)