LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Control Orientalmotor AZ via Modbus RTU (RS485)

Hello everyone,

 

I would like to control a stepper motor with a LabVIEW program by RS485 via Modbus RTU.

There is little documentation on the internet, but the manual is quite good.

I have connected the driver with an internet cable, and it is connected to my PC via a USB to RS485 dongle.

 

To control the motor, we can use the app MEXE02 and modify the motor data.

Using the LabVIEW program, I would like to execute the Operation Data n° 27 to 36 – as shown in the screenshot below.

juliombg_0-1716970882720.png

 

I think I can use the manual part 7 – 10 Operation data R/W command (p385).

juliombg_2-1716970986378.png

 

If I understand correctly, I set:

  • Port: COM3
  • Baudrate: 115200 bps
  • Slave address: 1
  • Communication parity: Even
  • Stopbits: 1 bit
  • Timeout: 3

 

I created the LabVIEW program just below:

juliombg_3-1716971038519.png

 

But the motor didn’t react, and I can’t understand my mistake, everything seems to be fine. Maybe it’s more about the structure of the ModBus communication.

 

I'd be very pleased if you could help me and explain my mistakes.
Thank you in advance.

 

0 Kudos
Message 1 of 9
(1,049 Views)

Hi,

 

First of all post the VI, not a screenshot. 

First question why the multiply by 64 ?

Show how you connected the RS-485 interface.

 

Kees

0 Kudos
Message 2 of 9
(1,001 Views)

Hi juliombg,

 

I don't think the RTU-Modbus CRC calculation in oriental motor matches the RTU-Modbus CRC calculation provided by the LabVIEW Toolkit.

To ensure correctness, I've implemented the CRC calculation according to the user manual.

0 Kudos
Message 3 of 9
(929 Views)

Hi, you already solve it? I have the solution. But seem like this one is old post so I do not know you still need help for this or not

0 Kudos
Message 4 of 9
(624 Views)

Hi, 
Can you please share the solution that you have?
I am currently looking into a project to control a oriental driver with Labview.

0 Kudos
Message 5 of 9
(396 Views)

So you want to execute operation No.1? That would use address register 6208. And are you using the correct VI for writing? The logo has a set of glasses, which suggest reading.

0 Kudos
Message 6 of 9
(379 Views)

Hi,

Firstly, download modbus library on VI Pakage Manager.

to open the connection, its very simple. Set the baud rate to 115200. make sure use the same ID on the driver and software.

 

zulfarid94_0-1738283040175.png

 

Then use Write Single Holding function .Set the direct data operation operation type. I use absolute positioning. 5B(Hex) is the register address and 1 is the range. 

zulfarid94_2-1738283716184.png

 

To Read the parameter, use Read Holding Registers. Refer to the manual for the read parameter address. Example below is to read position of the motor.

zulfarid94_4-1738284256881.png

 

To move or execute the motor. You need to set the position, speed, and lastly to triggered the motor.

zulfarid94_5-1738284494794.png 

zulfarid94_6-1738284517954.png

zulfarid94_7-1738284536658.png

 

Sorry, I do not have a proper VI for this. Just refer to the manual for the address. Let me know if you not working

 

 

 

Message 7 of 9
(340 Views)

@zulfarid94 - Thank you very much!!!

0 Kudos
Message 8 of 9
(325 Views)

Hello, I'm currently working on a similar project and I implemented your code in LabVIEW but I'm not quite sure on how to connect those parts and the modbus instances. Do you maybe have an overview of your VI? Thanks. 

0 Kudos
Message 9 of 9
(61 Views)