LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Controlling myrio with delta asda-a2 ac servo motor driver

Solved!
Go to solution

Hi Mr.  

 

thanks for your reply

 

Firstly I just don't want to connect to PWM express vi but alternatively I don't know how. For another issue, it is enough to produce a frequency of 40 khz for now. that's fine, the problem is that I want to generate a certain number of pulses as well as a frequency of 40 khz.
For example, if I add 100,000 pulses, I want to generate a piece of code that expects a new pulse count when 100,000 pulses are over. Because frequency determines the speed of the motor and the number of pulses determines the position of the motor.

0 Kudos
Message 21 of 29
(184 Views)

Hi worker,

 


@constructionworker wrote:

For example, if I add 100,000 pulses, I want to generate a piece of code that expects a new pulse count when 100,000 pulses are over.


Typically you solve this problem by placing a loop around your pulse generation code: with the next iteration a new pulse count is used...

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 22 of 29
(181 Views)

That's all pretty trivial to do in FPGA (not getting to know FPGA programming but once you can do that this is really a trivial exercise). I still think it would be actually easier for you to investigate a bit more about the serial communication with the Modbus protocol. Yes Modbus can be a hassle to get working, especially with a USB serial port that you want to connect to anything but the predominant Windows OS with something else than the manufacturers own software package but it would avoid many of the problems you are now fighting with.

Rolf Kalbermatter
Averna BV
0 Kudos
Message 23 of 29
(180 Views)

Hi mr.

 

After doing some research to do it using Modbus, it really takes a lot of effort. Almost no examples. Therefore, I want to communicate with modbus later. For now I'm just trying to go to the designated location by generating frequency and specific pulses. Because I think it's a little easier and might work.

 

Again, thanks for your opinion.

0 Kudos
Message 24 of 29
(171 Views)

Mr.

It generates frequency with pwm express vi, but I don't really know how to determine the number of pulses. I couldn't find an example on this subject.

0 Kudos
Message 25 of 29
(170 Views)

@constructionworker wrote:

Hi mr.

 

After doing some research to do it using Modbus, it really takes a lot of effort. Almost no examples. Therefore, I want to communicate with modbus later. For now I'm just trying to go to the designated location by generating frequency and specific pulses. Because I think it's a little easier and might work.


There are virtually millions of Modbus applications out there including in LabVIEW and probably 100ds of youtobe movies, tutorials and LabVIEW posts about doing Modbus. Just not with your specific device.

 

But your problem about not being able to specify the number of pulses is simply from using Express VIs. Express VIs are quick solutions that let you "configure" a few parameters with "zero" programming. They implement certain common problem solutions and if your problem is 3% different they won't work anymore for you. Then you have to forget Express VIs and start and do your own real programming.

Rolf Kalbermatter
Averna BV
0 Kudos
Message 26 of 29
(168 Views)

Thanks for your opinion and suggestions. I gave up using Pwm express vi a little after your suggestion. I am trying to generate a pulse with any digital pin on top of that. How nanosecond time can be used in Labview. Here is my sample application.

 

0 Kudos
Message 27 of 29
(160 Views)

Hi worker,

 


@constructionworker wrote:

I am trying to generate a pulse with any digital pin on top of that. How nanosecond time can be used in Labview.


As has been said several times before: employ the FPGA in your myRIO.

It will allow you that "nanosecond time" (usually 25ns steps with a 40MHz clock) easily.

Best regards,
GerdW


using LV2016/2019/2020 on Win8.1/10+cRIO
0 Kudos
Message 28 of 29
(156 Views)

In fact, generating 40 khz pulses is enough for me for now because the motor has a resolution of 1,280,000 pulses. 100,000 pulses corresponds to one revolution. But I have adjusted the gear ratio parameters in the motor driver to complete one revolution of the motor when a 40,000 khz pulse is sent. This resolution is enough. 40 khz pulse is enough for now, my main problem is if I
If I send a 40khz pulse, the motor is constantly spinning. The motor I want to create should stop after completing one revolution.That is, after 40,000 pulses are sent, I want to program the motor to stop rotating and wait for the new pulse. In this case, I need to create pulses and see the number of pulses generated. If it completes 40,000 pulses in 1000 milliseconds, the motor rotates slowly.
If 40,000 completes in 10 milliseconds, the motor will spin faster.
It is necessary to control both parameters, speed and number of steps.
I need help with this.

0 Kudos
Message 29 of 29
(145 Views)