professor_jonny

cp1l modbus coms to danfos fc280 midi drive sample program

11 posts in this topic

Posted (edited)

Hi

I have adapted a sample cp1l function block Modbus program to talk to the new Danfoss fc280 midi drive.

It will read and write the standard FC control profile it would be easy to extend the pcd feature to multiple words all the base is there.

I have not implemented parameter writing and reading but it would be easy enough to extend it but for my application I don't see the need.

It may come in useful to someone as there does not seem to be much out in the wild and the Danfoss Modbus document is somewhat confusing and actually has incorrect data.

It was tested and setup with L series cpu

 

 

 

 

 

Modbus_Danfoss_fc280.cxp

Edited by professor_jonny

Share this post


Link to post
Share on other sites

Hallo Jonny .

can the program also work with an CJ2M31 or 33 with a SCU42 MODBUS comminicating with the FC51 from Danfoss ?

 

 

Share this post


Link to post
Share on other sites
Just now, Johanb said:

Hallo Jonny .

can the program also work with an CJ2M31 or 33 with a SCU42 MODBUS comminicating with the FC51 from Danfoss ?

 

 

I'm prity sure you will need to modify to suit but I'm not sure really, this is more designed for the cp1 series easy Modbus master function blocks

all the hard part with the addresses and Modbus conversion has been done you just need to redirect the data to the scu42.

 

 

Share this post


Link to post
Share on other sites

I have downloaded your prog , but I can not find the configuration for the FC280 .

or what kind of communication you use for the serial port ( ( protocol macro or serial  ).

I have now an prog running for the distance selction on an internal shooting range .

I use a Fc51 to drive a motor with revolution trigger and Home sensor ( connected to the FC51 .

the drive communicate by Modbus to a SCU42 card from OMRON .

all Data is read and controled through ethernet IP and a NS5 screen .

I have only some problem writing the start coil and changing some parameters .

that is why I would like to try out your prog .

 

regards johan

Share this post


Link to post
Share on other sites

Init_setup contains the setup for the read and write register the target note and the amount of words you want to send/ receive.

The FC_port sections contain the control, status, main actual value and reference as set by default with the Modbus control word and is the default 2 read and write control words as defined in the danfoss drive Modbus manual.

I have broken the control word into output coils so it is real easy to run the drive just by setting bits all the magic is done in the function blocks and I'm guessing you will be able to use the base code for your cj2 plc and scrap the functionblocks.

Modbus_RTU section contains the read and write parameters you could translate to what ever serial port you wish to use currently they are setup using the Modbus easy master function blocks.

This program is aimed as the cheap brick plc's using the plug in cif11 option port the serial port settings are setup in the plc setup.

 

 

 

 

 

Share this post


Link to post
Share on other sites
18 hours ago, Johanb said:

I use a Fc51 to drive a motor with revolution trigger and Home sensor ( connected to the FC51 .

the drive communicate by Modbus to a SCU42 card from OMRON .

 

you could upgrade the drive to the fc280 or fc302 and use EithernetIP option card it makes more sence than using Modbus in your case.

my plc does not have EithernetIP or that is what I would use.

Share this post


Link to post
Share on other sites

The point is I controle 15 shooting range .

Each range is controled by a NS5 screen connected in a LAN. 

the FC51 are connected in an 2 wire MODBUS netwerk only using the connections 68 & 69.

this way I only have one Display prog .

1 short program that collects the message .

and 1 prog for the FC51 .

I can read the parameters 843.0 till 843.15 and write  the Data into the parameters 842.0 till 842.15 .

but i can not start or stop the inverter for there is no setting in 832.0 till 842.15 .

so how do I start and stop the inverter by Bus command..

I can send you the zip progs I am using if you like to have take a look at them

regards Johan

Share this post


Link to post
Share on other sites

you need to write to register AF9 and you need to read register B5D those are the read and write starting control and status words.

To get the drive ready to run you need to operate coils: 2,3,4,5 and 10 to disable the brakes and stop commands and test coil hex 043c 

you then operate coil 6 and the drive will run (hex 047c) , but you have not given it a reference using the second write control word AFA or select a preset reference via coils 0 or 1 and have a preset reference programmed in to the drive menu.

You really need to look at the section FC_port_ctw_1 and FC_port_ref_1 in my program it is very simple.

 

I'm not 100% sure the 51 and 280 are the same you may need to look into that but I know the 2800 fc280 and fc302 are the same.

 

 

 

 

 

 

 

 

 

Share this post


Link to post
Share on other sites

Hallo Jonny .

sorry for the delay .

the thing is Danfoss just limited the number of acces parameters for the cheap inverters .

the FC051 has 2 setups and for that less parameters to acces .

I hve writen the program in Smart logic , but do to not enough functions and to shine up the working I went for Modbus .

now the shooting range works with a start/home push button ( starting the smartlogic( input :18 ) )

a 3 selector switch ( selecting the 3 distance ( input 19 ;27 ) what is working

to reverse the drive I use setup 2 and 18 to start the drive and connection 29 as counter input while input 33 tells the drive it is at home position and reset the smart logic

the drive you use hase 4 setups and there for 2 times more possebilitys but moor exspansif .

the OMRON plc and ns screens came from a gift .

So I am looking at an shine way to replace the button box by a touch screen just doing the same thing but then more visual .

So :

activate input 18 to start the smart logic .

selct the different distance with the input 19 & 27 ( distance 1 19 : ON / 27 :OFF ; distance 2 19 :OFF /27 ON  ; distance 3 19: ON/ 27 ON .If 19 and 27 are OFF the smart logic whill not start .

I can read the status from the inputs , but can not change there staus with ModBus , and that is what I want to do .

so I you have an idee I will try it .

long story but hope it will clear why I am so driven

regards and thanks for all the feedback .

johan

Share this post


Link to post
Share on other sites

I think you need to plug in the danfoss graphical lcp and look at the control word in hex when you write to the Modbus to see if it changes.

AF9 is the address you need to write to for the fc280 I guess it is the same with the 051

I'm guessing you have the drive comms set to comms only or comms and digital.

 

it sounds like you are reading the physical terminals on the drive you need to write to the virtual bus inputs/ registers at address AF9.

 

putting in a screen and plc on an already working setup seems like you are over complicating it I think this is rule no1 in plcs to make it simple :-)

 

 

 

Share this post


Link to post
Share on other sites

Jonny .

Thanks for the advice .

I will rewrite that part and check if it will work .

regards johan

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now