You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old June 30th, 2022, 10:13 PM   #1
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
Running a Danfoss VLT micro drive using Allen Bradly Mirco850

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.
  Reply With Quote
Old June 30th, 2022, 11:44 PM   #2
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
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.
  Reply With Quote
Old June 30th, 2022, 11:48 PM   #3
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
Pictures

Here are the some pictures of the set up and the program I am trying to run.
Attached Images
File Type: jpg Msg_modbus_rtu.jpg (130.6 KB, 9 views)
File Type: jpg Modbus Error .JPG (96.9 KB, 7 views)
File Type: jpg PLC mounted with drive.jpg (119.4 KB, 7 views)
  Reply With Quote
Old July 1st, 2022, 02:36 AM   #4
5618
Lifetime Supporting Member
United States

5618 is offline
 
5618's Avatar
 
Join Date: Oct 2017
Location: York, PA
Posts: 243
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 by 5618; July 1st, 2022 at 03:34 AM.
  Reply With Quote
Old July 1st, 2022, 10:57 AM   #5
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
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.
  Reply With Quote
Old July 4th, 2022, 02:24 PM   #6
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
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?
Attached Images
File Type: jpg ModbusRTU_noerrormsg.jpg (119.9 KB, 1 views)
File Type: jpg Variablesused on Modbussrtu.jpg (103.0 KB, 1 views)
File Type: jpg WhatsApp Image 2022-07-04 at 8.14.08 PM.jpg (74.2 KB, 4 views)
  Reply With Quote
Old July 4th, 2022, 03:16 PM   #7
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,916
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?
  Reply With Quote
Old July 4th, 2022, 03:51 PM   #8
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
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)
Attached Images
File Type: jpg CommunicationDiagnostics.jpg (33.8 KB, 70 views)
  Reply With Quote
Old July 4th, 2022, 04:26 PM   #9
Steve Bailey
Lifetime Supporting Member + Moderator
United States

Steve Bailey is online now
 
Steve Bailey's Avatar
 
Join Date: Apr 2002
Location: The boondocks of Western Massachusetts USA
Posts: 7,916
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?
  Reply With Quote
Old July 4th, 2022, 06:39 PM   #10
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 3,579
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?
  Reply With Quote
Old July 4th, 2022, 06:52 PM   #11
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 3,579
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.
  Reply With Quote
Old July 4th, 2022, 07:30 PM   #12
Greg Fowlds
Member
New Zealand

Greg Fowlds is offline
 
Greg Fowlds's Avatar
 
Join Date: Apr 2004
Location: Currently, Waiheke Island, NZ
Posts: 123
Check that terminal 12 to 37 is linked.
This is "safe stop", it can be programmed out but easiest to link.
  Reply With Quote
Old July 6th, 2022, 05:08 AM   #13
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
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.
  Reply With Quote
Old July 6th, 2022, 05:19 AM   #14
JustinRBean
Member
South Africa

JustinRBean is offline
 
JustinRBean's Avatar
 
Join Date: Jun 2022
Location: South africa
Posts: 9
Quote:
Originally Posted by Greg Fowlds View Post
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.
  Reply With Quote
Old July 6th, 2022, 06:43 PM   #15
ASF
Lifetime Supporting Member
Australia

ASF is offline
 
Join Date: Jun 2012
Location: Australia
Posts: 3,579
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.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
allen bradely 525 drive trouble mavrick LIVE PLC Questions And Answers 16 May 24th, 2019 01:07 PM
Allen Bradley Powerflex 753 Drive Error Nandraj LIVE PLC Questions And Answers 4 October 2nd, 2018 03:14 PM
Looking for a rebuilt Allen Bradley 1336 Impact 250 Hp Drive Rob S. LIVE PLC Questions And Answers 6 April 26th, 2016 06:14 PM
Powerflex 40 drive suddnly stopping while running & there is no alarm on the display sahebanna LIVE PLC Questions And Answers 1 April 2nd, 2012 02:51 AM
Abb Ac Drive rajendrad LIVE PLC Questions And Answers 13 November 5th, 2006 11:18 AM


All times are GMT -4. The time now is 04:29 PM.


.