BLE motor/driver control through Modbus

Discuss Stepper motors, Drivers, Controllers, GUI's and related Accessories here.
benjaminrigsby
Posts: 3
Joined: Mon Nov 13, 2017 11:09 am

BLE motor/driver control through Modbus

Postby benjaminrigsby » Mon Nov 13, 2017 11:43 am

I have a BLE series motor/driver, which I'm trying to control through Modbus. I'm using the pymodbus libraries in Python, but I haven't been able to get a response from the motor beyond a successful connection. I have verified the motor and controller are connected properly by moving the motor through MEXE02.

Here is the relevant portion of the code I'm testing. (Register addresses are per the BLE manual.)

Code: Select all

client.write_register(1152, 0000)
client.write_register(1153, 0500)

According to the manual, these registers should control the speed of the motor. Do I have to write some other registers to move the motor? Any help is appreciated as I'm new to Modbus and may be unaware of some key steps.

om_tech_support_JS
Posts: 166
Joined: Tue May 10, 2016 4:48 pm

Re: BLE motor/driver control through Modbus

Postby om_tech_support_JS » Mon Nov 13, 2017 12:58 pm

Hi benjaminrigsby,

In regards to your post, the Speed Registers will have upper and lower values (1152 for Speed No. 0 Upper and 1153 for Speed No. 0 Lower). You can store up to 16 different speeds into the series of registers (Speed No. 0 ~ Speed No. 15). However, in order to have the motor move, then you will need to turn on either the forward (FWD) or reverse (REV) bit in the command register. The command register (007Dh (125 decimal)) can be found on page 97 of the manual.

benjaminrigsby
Posts: 3
Joined: Mon Nov 13, 2017 11:09 am

Re: BLE motor/driver control through Modbus

Postby benjaminrigsby » Mon Nov 13, 2017 1:41 pm

Thank you for the quick response.

How do I activate each bit (input) of the 007Dh register; i.e., what value should I write to it? I see the bit assignment on page 97 and parameter explanation on page 54 of the manual. However, I don't see an example of how to turn a specific bit on or off.

om_tech_support_JS
Posts: 166
Joined: Tue May 10, 2016 4:48 pm

Re: BLE motor/driver control through Modbus

Postby om_tech_support_JS » Mon Nov 13, 2017 2:07 pm

Hi benjaminrigsby,

In regards to your latest post, the value that you write to the 007Dh (125 decimal) register will be dependent on the binary code that is created from turning on the specific bits.

For instance:
If you want to run Speed No. 0 in the forward direction. Then you would turn on bit 3. This creates the binary code of 1000. You can then convert this to the hex value (8) or the decimal value (8), depending on which you are writing in.

For two other examples:
1.) Running the same Speed No. 0 in the reverse direction, then you would turn on bit 4 (10000). This 10000 then converts to 10h or 16 decimal.
2.) Running Speed No. 1 in the forward direction, then you would turn on bit 3 and bit 0 (1001). This 1001 then converts to 9h or 9 decimal.


To stop the motor, you can then write 0 to the 007Dh (125 decimal) register.

benjaminrigsby
Posts: 3
Joined: Mon Nov 13, 2017 11:09 am

Re: BLE motor/driver control through Modbus

Postby benjaminrigsby » Thu Nov 16, 2017 9:58 am

I tried turning the FWD bit ON as you outlined in your last response. However, I was still unable to get a response from the motor (beyond connection) using a Modbus programming library.

Given these issues, I'd like to verify I can successfully write a Modbus command outside of the Modbus library by using Comtest Pro as suggested in another post here. However, when I try this, I get "communication error: no response received" from Comtest. This happens if I try to read or write any registers. Do you have any suggestions on how to can find the problem via Comtest or some other software? I've included relevant settings on the driver and software below.

Forum post reference: http://forum.orientalmotor.com/viewtopic.php?f=23&t=675&p=1641&hilit=comtest+pro#p1641

(Comtest) Step 1 settings: COM1 (checked with Windows), 115.2k (set on driver: see below), 8 bits, no parity, 1 stop bit.
Communication and power: I have the motor cable, 120V AC, 24V DC, and your CC-link USB cable connected to the driver.
Switches: SW1 (set to 1); SW2 (both OFF); SW3 (all ON); SW4 (set to 4); SW5 (No. 1 OFF, No. 2 ON)

om_tech_support_JS
Posts: 166
Joined: Tue May 10, 2016 4:48 pm

Re: BLE motor/driver control through Modbus

Postby om_tech_support_JS » Mon Nov 20, 2017 8:42 am

Hi benjaminrigsby,

In regards to your post, when you said that you have our "CC-link USB cable connected to the driver," were you referring to the CC05IF-USB? The CC05IF-USB cable will only allow you to connect our product to the MEXE02 software, but cannot be used as the communication cable. Instead, you will need to make the RS-485 communication cable that connects to the CN7/CN8.

In the past, we have recommended the following USB to RS-485 converter:
http://www.orientalmotor.com/products/p ... B_v1_0.pdf


Please note that this is a recommendation that we have had in the past for our customer's convenience. There may be other converters or a recommended updated product that this company offers.


Return to “Stepper Motors and Controls”

Who is online

Users browsing this forum: sedroljoxin and 1 guest