Running a Danfoss VLT micro drive using Allen Bradly Mirco850

JustinRBean

Member
Join Date
Jun 2022
Location
South africa
Posts
10
Hello everyone,

I am an engineering student who took on a project to design and build a control system for an industrial coffee roaster as my final year project. I have experience with Arduinos and Nucleo development boards but my experience with PLCs has been limited to simulation software, since my university went into hard lock-down during covid and my 12 months of practical training was cut from my course. I have been trying to make up for this by sticking my nose into local companies and asking enough questions until they let me do work for them as way of free training for me.

My strategy has been to do one thing at a time and deal with problems as they arise. My current challenge is to connect a Danfoss drive to the PLC and use Modbus RTU protocol, using the embedded serial port on the plc, to start, stop and control the frequency of the drive. I discovered this forum after a frustrating 3 weeks of late nights between exams and work, reading what seems like countless manuals. If anyone can offer guidance, I would be extremely grateful.

The above is a brief pre-amble, I will follow with what hardware I am using and the very simple program i am trying to run.
 
So, my first goal was to establish Modbus RTU communication, using the embedded serial RS-485 port on the plc, between the PLC and the motor drive. Once comms are working for simple commands, start, stop, speed control then I can start adding the other drives and designing the logic to control the motor speed using an encoder.

Equipment:
PLC: Allen Bradly Mirco 850
Drive: Danfoss Micro Vlt
Motor: 0.37KW 3-phase induction motor

I programmed the drive Modbus RTU parameter to the following:

[8-03] set to 60 (Control word timeout)
[8-04] set to 0 (Control word timeout function set to OFF)
[8-30] set to 2 (Protocol set to Modbus RTU)
[8-31] set to 1 (Set drive address to 1)
[8-32] set to 19200 (Set baud rate to 19200 corresponding to PLC baud rate)
[8-33] set to 0 (No parity, 1 Stop Bit)

Motor was already programmed in to run in manual mode and everything seems to be running normally.

MSG_MODBUS ladder diagram parameters for connected components:
Channel = 2 (Use embedded serial port)
TriggerType = 0 (Msg triggered once)
Cmd = 16 (write multiple registers)
ElementCnt = Speed set to frequency of 50HZ

Modbus Address\

Here I tried to set the drive frequency by using the frequency command word with a value corresponding to a frequency of 50HZ:

Frequency reference: Modbus address = 2811 (I changed this value to decimal assuming it is in hex)
Value of address = 0(dec) = 0HZ to 16384(dec) = 50HZ

When i run the program I get an error message 33.
 
Error 33 is bad MSG parameter. LocalCfg and TargetCfg use compound data types, not direct values. You can create a tag, for example called WriteTarget of data type MODBUSTARPARA which will contain two elements, WriteTarget.Addr and WriteTarget.Node. Use that as your input for TargetCfg.

LocalCfg input uses a data type MODBUSLOCPARA with four elements: Channel, TriggerType, Cmd, and ElementCnt. You can create a tag for this input.

Alternatively, I think you could put your parameters directly into the LocalCfg and TargetCfg elements of the MSG_MODBUS_RTU_T... (whatever is the rest of the name not shown) tag and leave the inputs blank. I haven't done that.

You will also have to figure out using a MODBUSLOCADDR array of words for LocalAddr and convert to and from whatever data types you're using in the programs.

Edit: looking at your pics again, I see you already have LocalCfg, TargetCfg, and LocalAddr tags. Use those as inputs to the message command.
 
Last edited:
Thank you 5618! I understand why the errors are popping up now.

I rewrote the ladder logic and now can send values to my drive without a problem... That is to say that the Modbus led flashes when ever my controller sends a message and the ERROR returns false.

It does seem that the Control words and FC profiles that I have are completely incorrect since the drive does turn on. I'll spend a bit of time trying to figure that one out and then possibly post it up should my efforts prove futile.
 
Hi everyone,

So I made changes to my program but can still not get my drive to turn on. I am trying send instructions to the drive to set the frequency and then turn on. The message led on the drive flashes when I send the Modbus message and the drive is in auto mode. There is no error message while the message is being sent but when i release the button it will show a error 55 message after a second.

I am using the following messages to send instruction to the drive:

Command word address: 2810(HEX) = 10256 [I set the address as 10257 on the plc]
Start: 1148 (47C)
Stop: 1084 (43C)


Frequency reference: 2811(HEX) / 10257 [I set the address as 10258 on the plc]
0Hz = 0(dec)
50Hz = 16384(dec)

Can someone possibly help point me to my error?

ModbusRTU_noerrormsg.jpg Variablesused on Modbussrtu.jpg WhatsApp Image 2022-07-04 at 8.14.08 PM.jpg
 
Most drives come out of the box set up for keypad control of both the run/stop and speed signals. To change to terminal or network control of those functions generally requires changing one or more parameters. It is not enough to simply send the commands over the Modbus link. The drive needs to be configured to accept those commands. Have you done that?
 
I programmed the drive Modbus RTU parameter to the following:

[8-03] set to 60 (Control word timeout)
[8-04] set to 0 (Control word timeout function set to OFF)
[8-30] set to 2 (Protocol set to Modbus RTU)
[8-31] set to 1 (Set drive address to 1)
[8-32] set to 19200 (Set baud rate to 19200 corresponding to PLC baud rate)
[8-33] set to 0 (Even parity, 1 Stop Bit)

CommunicationDiagnostics.jpg
 
I don't think you understood my response. You may have properly set every parameter related to the Modbus RTU protocol, but if you didn't set the parameters that instruct the drive to accept run/stop and speed commands from the Modbus link nothing will happen. Can you start and stop the drive using the keypad?
 
To expand on Steve's comment - all VSD's can be started and stopped in a multitiude of ways. Via the keypad, via digital inputs, via inbuilt serial ports like your Modbus RTU, via add-on fieldbus communication modules like Ethernet/IP or Modbus TCP, via analog signals and a PID loop, the list goes on.

Almost every drive I've ever used will only accept start/stop commands from one of those sources at a time. There will be a parameter (or several) that define which start command the drive is currently "listening" for. Out of the box, most of the drives I've used are configured for either keypad start stop (i.e. from the physical buttons on the drive itself) or terminals (i.e. digital start/stop signal hardwired to digital input terminals on the drive). If you want your drive to act on your Modbus RTU start signal, you will need to find that parameter and set it accordingly.

The same applies to your speed reference. Even if you have the drive accepting your start/stop signal, you may still have it "listening" for a speed reference elsewhere. That will just mean that it will "start", but run at zero speed, which is largely indistinguishable from being stopped.

Do you have the manual for the drive handy?
 
Assuming your drive is the FC51, manuals can be found here and here. Look for parameters like Reference 1 Source and Control Site.

Error messages are also shown in this manual; error 55 means "AMT Parameter Out of Range". AMT refers to Automatic Motor Tuning - it may be that a motor autotune is required, but I have a hunch that, as I suggested before, the drive is attempting to run with a zero speed reference. If you want to run a drive with a very low speed reference, an autotune is essential.
 
Hi Steve,

I didn't understand what you meant.

I can start the drive when set to the HandOn mode and using the keypad pot. As soon as I push the Hands ON button then the motor will try track to whatever speed the pot is set at.

The drive is set to listen for FC Rs485 when in Auto mode. But I cannot change the frequency setting to get it to turn. I do not know if my drive is turning on or not with the Modbus command. In manual mode (i am assuming that is the same as Hands On mode) the motor will whine when the turned on even when the motor is not turning.

I am not sure what other parameters need to change on the drive.
 
Check that terminal 12 to 37 is linked.
This is "safe stop", it can be programmed out but easiest to link.

Hi Greg,

I assume you mean terminal 12 to 27? I have seen drives with a terminals connected and was wondering about that. But I thought that if the drive is set to be listening to the control word source FC rs485 it would ignore the digital inputs.
 
Not all drives have safe torque off, if yours doesn't you can disregard.

The drive can be configured to look at Modbus, Digital Inputs, or Both. Make sure it's not set to both.

As per my previous post, Reference 1 Source is the parameter you need to look at for sending a speed reference over modbus. Of course you also need to make sure that Reference 1 is selected, but generally it will be selected by default.
 

Similar Topics

A new point I/O rack is to be hooked up with the running PLC. In point I/O, it is supposed to be the OA4 card to be installed as per the...
Replies
1
Views
74
Hi, I received this SIMATIC S7-300 training kit for maintenance. When I power it up, the PLC doesn't go to RUN mode and the STOP mode led is...
Replies
7
Views
252
Hi I got a powerFlex 525 AC Drive (used) i changed parameter t053 to 2 to do factory reset and now i have both parameters 46 and 47 on 1 but cant...
Replies
2
Views
130
Word of warning. I had issues with a 5069-AENTR not appearing in IO selection. After downloading the latest version 40 AOP, still didn't appear...
Replies
0
Views
123
Hi all, I have a question about the communication from the FTV and the PLC for different machine I use. Most of these use a SLC5/04 PLC and...
Replies
0
Views
258
Back
Top Bottom