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.


 

Here is a question I don't think you have answered (or I missed the answer):  If you connect the Controller to your PC using a USB Cable and turn the Controller on, what devices does NI-MAX show is connected to the PC?  Are there any VISA or COM connections listed?  A screen-shot of the "Devices and Interfaces" section of MAX would be helpful.

 


If I connect the servo driver NI-Max it detects that a com port is connected.

 

I guess talking to the servo driver via usb would be a bit of a hassle, right?
I think it would be easier if I could do this over the CN1 Port. But there must be a way to do this too, but I don't remember.

 

0 Kudos
Message 11 of 29
(1,188 Views)

@constructionworker wrote:

Hi mr.

 

If I connect the servo driver NI-Max it detects that a com port is connected.

I assume that is when you connect the USB port to the computer. This means that it is a Virtual Serial Port USB device that Windows recognizes.

 

I guess talking to the servo driver via usb would be a bit of a hassle, right.


That depends very much on the USB controller used on the device. Most likely you installed the software from the manufacturer on your computer too, which may or may not also have installed a Windows driver for the USB communication device. It could give some extra information if you can try to connect it to a computer that has no software installed from the manufacturer and then see in the Windows device manager if it still recognizes the device as serial port.

 

The myRIO is however a Linux device and while it is VERY likely that this USB serial port could be made to work under Linux too, it often requires command line hacking on the Linux device itself, and modifications of Linux startup scripts, so it is not something for the faint hearted. In addition you will have to also figure out what protocol to talk over that serial port. According to the manual it supports Modbus RTU and Modus ASCII and while there are LabVIEW libraries to do that, it is also not always straightforward to get it to work and to translate the register address information in the manual into actual values that you need to pass to the Modbus Read and Write functions. However it is very unlikely that you could damage your myRIO in this way, which I'm a little weary that you may do when using the CN1 connector.

Rolf Kalbermatter
My Blog
0 Kudos
Message 12 of 29
(1,178 Views)

Does anyone have any knowledge of modbus control. Or anyone who has made such an example before. There is some information about the modbus protocol in the Delta ac servo user manual, but I don't know how to interpret it.

0 Kudos
Message 13 of 29
(1,158 Views)

I can't help you with this specific device. And Modbus is a little tricky since it is a broadly used standard and the standard was originally defined by a manufacturer who didn't attempt to control its use (which is probably why it is so broadly adopted but also makes that many implementers had their own ideas about how to exactly implement and document it).

 

Read here an introduction about Modbus use in LabVIEW.

First you want to find a good Modbus library that you can use in LabVIEW. The above document recommends to use the Datalogging and Supervisory Toolkit, but that is a bit outdated and cumbersome if you only want to communicate with a Modbus device. NI also has several LabVIEW libraries but this one might be a good starting point. This is the VIPM download link. There are several others such as the Plasmonique library.

 

As far as your device goes you will want to look into chapter 8 of the earlier linked manual. There the parameters have all associated addresses that correspond directly with the parameter number. P0-00 is the address 0x000, while P3-02 is address 0x302.

 

So you will need to find out what modbus protocol to use (ASCI or RTU) and then probably do a read "holding register" to read the according address and a "write single register" to write to that according parameter.

Rolf Kalbermatter
My Blog
0 Kudos
Message 14 of 29
(1,154 Views)

mr.  Thank you for your answer

 

I tried a little, but I came to the conclusion that it takes a long time to drive a servo using the RS-232 communication protocol. That's why I gave up on this method. I will work on it later.
I want to use the motor in position(PT) mode using the CN1 connector, I think it is necessary to create a position pulse and signal. Does anyone know how to do this with myrio? How to produce a pulse and signal to move to any position.

0 Kudos
Message 15 of 29
(1,137 Views)

Hello everyone, the engine I use is Delta asda-a2 engine.
I want to do external positioning on the CN1 pin.
It is necessary to give direction and position information to some pins from the CN1 connector. I think it is necessary to send a pulse to the PULLH and SIGN pins.
I've done research on this subject, but I haven't been able to come to a clear conclusion. With Myrio, it is necessary to generate both a pulse and a direction signal for the servo to go to the position and know the direction. Does anyone know how to generate these signals?

 

Any opinion given is worthy of respect.

0 Kudos
Message 16 of 29
(1,186 Views)

ConstructionWorker:

 

     Your Delta ASDA-A2 Servo Motor is very difficult for us to help you "debug" and understand by occasional brief questions from you and little information back.  For example, I asked you about what MAX shows when you plug the device in, and asked for a Screen Shot of Devices and Interfaces.  In your response, you failed to provide the Screen Shot, so I don't know how the Device identified itself.  Specifically, I don't know whether to advise you to "explore your device" using MAX's VISA Test Panels or not.

 

     You need a competent Electrical Engineer on site to study the Manual with you and figure out how to connect your Device to the Analog Inputs and Outputs and the Digital (TTL) Inputs and Outputs of your myRIO.  Someone with experience in controlling devices through a Digital Interface would be useful as you start to implement a system for controlling your device digitally.  I don't know what you are controlling, nor the power of the actuators, but Safety should be built into your design.

 

     Please try to find local help that can spend the time and has the expertise that you require.  I suspect that neither RolfK nor I are sufficiently "local" ...

 

Bob Schor

0 Kudos
Message 17 of 29
(1,131 Views)

Hello to everyone
I have a delta asda-a2 Ac servo motor. I need to generate frequency and pulse in order to control the position of this motor. In this case, I need both the frequency and the number of pulses.

0 Kudos
Message 18 of 29
(1,147 Views)

hello Mr. Bob_Schor
I cleared some issues and now I'm stuck in PT position control mode. With Myrio I can drive the servo in position mode, but that's not quite as desired. I can generate frequency with PWM express vi but the main issue is not to generate pulse at a certain frequency. It is the number of pulses produced.

I need to generate 100,000 pulses at 100kHz. If I produce 100,000 pulses at the end of 1 second and then the motor will spin faster.

I need to be able to control two different parameters, the number of pulses to be produced in Myrio and the pulse frequency. In this way, the motor should go to the desired position and stop.
I don't know how to do this. But I will continue to research and try, if anyone knows anything about this, it would be great.

I found an example as attached below for dc servo control. But I don't know how to adapt it to the servo.

0 Kudos
Message 19 of 29
(1,100 Views)

Hi worker,

 


@constructionworker wrote:

With Myrio I can drive the servo in position mode, but that's not quite as desired. I can generate frequency with PWM express vi but the main issue is not to generate pulse at a certain frequency. It is the number of pulses produced.

I need to generate 100,000 pulses at 100kHz. If I produce 100,000 pulses at the end of 1 second and then the motor will spin faster.


With your myRIO you got access to an embedded FPGA and so you can quite easily output any number of pulses at the desired speed! Why do you stick with ExpressVIs?

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 29
(1,064 Views)