S7-1200 rs485

JBA-DK

Member
Join Date
Sep 2015
Location
Haderslev
Posts
62
Hi all:)

I am new here on this forum and i hope to find help here.

Currently i am working on a projekt including a S7-1200 CPU, 6ES7241-1CH30-1XB0 RS485 module and a small Danfoss FC51 drive. My task is to setup a communication between the module and the drive using the plc as master.
I want to if possible start, stop, set speed and get some feed back. I started up using a sample found online using two s7-1200 plc`s communication between these. Then i deleted the slave in the projekt an instead using the drive as a slave. This did not work for me using several different communications setup, only send or only recive from slave or both. I have been in contact with siemens and they have guided me and also sent me a sample projekt including a S7-1200 PLC and a siemens V20 drive i think it was. Then i tryed to modify this projekt but with absolutely no luck getting anything working. When the plc sends a command then it looks like the drive is responding back when i look at the led`s. So i am pretty shure wiring is ok. I can read out several different fault codes out in the plc. I have tried a different drive also with no luck.

I have wide experience in these plc`s as i have used them many times in various projekts.

Does anyone in here have any kind of experince in this module? Then i would be happy to get any kind of help on this projekt or maybe get a sample. My cpu in the projekt is firmware v3.
 
Hi JBA-DK

I don't know this specific drive from Danfoss, neither do I know much about serial communication.

I was wondering if you could install a PROFINET interface into the drive? We have used that quite a lot with Siemens and FC202 and FC302 Drives and it is very good. (and easy :) )

If you do have to stick to serial communication, you might try to get something going with an arduino or mbed. Just to be able to look at the exact messages, and then once you understand that, try to interface the PLC and drive.

Reading up some while typing this, are you using modbus?
 
I dont know so much about serial communication either. I know there are different types of protocols and the one i want to use is modbus in this case. I know that each slave number has to have different adress, baudrate, stop bit even and so on has to match in both master and slaves. The reason for using serial communication is the low cost and almost all drives include a rs485 option.

Using a profibus Card or profinet would have done the job fast and easy i agree:)

Also im not sure about how i access the correct registers numbers and parameters in the drive. I read something about the adresses that i have to multiply by teen and then substracte by one to access the parameter.

What is ardoinu and mbed?
 
Have you had contact with Danfoss about this? Always had great support from them in Denmark.

I assume you have these: http://www.danfoss.com/NR/rdonlyres...-8B2D62FCEE9E/0/FC51_DesignGuide_MG02K302.pdf

https://support.industry.siemens.co...ortal)-for-the-simatic-s7-1200?dti=0&lc=en-WW

The Arduino and MBED are cheap microcontrollers that are very easy to program. You could easily visualize the data sending/receiving by the serial interface.
http://playground.arduino.cc/Code/ModbusMaster

I am not well versed in modbus RTU :). but I am sure someone here will be able to point you to your solution.

Lykke til!
 
I dont know so much about serial communication either. I know there are different types of protocols and the one i want to use is modbus in this case. I know that each slave number has to have different adress, baudrate, stop bit even and so on has to match in both master and slaves. The reason for using serial communication is the low cost and almost all drives include a rs485 option.

Using a profibus Card or profinet would have done the job fast and easy i agree:)

Also im not sure about how i access the correct registers numbers and parameters in the drive. I read something about the adresses that i have to multiply by teen and then substracte by one to access the parameter.

What is ardoinu and mbed?

Well THIS can take much time....

Firstly you should get the hard facts about the character frame and register adresses from Danfoss - and how you set it up in the drive.

Then, to start the hit and miss exercise, it is easiest to use a RTU master program in the PC. Get an usb/(RS232 + rs232/)rs485 converter. Here are several RTU master SW suggestions:

http://www.plctalk.net/qanda/showthread.php?t=78209

What is good with testing in a PC is that if you query illegal adresses, you'll see the exception codes in the echo window of the Modbus master.

Then, when you have found out how the queries should be arranged, you can try to convert it to PLC code.

And - if you are to connect only a few drives, go for Profinet as boneless suggested. It will be much more robust and much, much more responsive.

Kalle
 
Hey JBA,

Have you got the application to run?
If not and if you want I can take a look on your project and help you out.

Best regards Victor
 
To Boneless: I have been in contact with Danfoss here in Denmark and also Siemens in Denmark. I have the manuals for the FC51 and the example you linked to is exactly the example i have been modifired and tryed to get up and running.

To Kalle Olsen: I will maybe try to read out with an adaptor/converter what is happening on the modbus Network. I have communication between plc´s running on profinet and drives/nodes running on profibus and this is the easy and fast way to do it.
But do you think you can get profinet options for all drive manufactures? And if you each time can save this profinet option you will save lots of Money. If it is af robust solution is another thing. Modbus/ascii has been used World wide and is still in use many places and why should it not be robust enough?? The responsivenes is not so important in this case.

To Victor: I havent been working on this projekt for a couple of weeks now and the drives are running just digitally at the moment until i solved this. Do you have an email or something and should i ship the projekt to you? Do have experince in this 6ES7241-1CH30-1XB0 module?
 
To Victor: I havent been working on this projekt for a couple of weeks now and the drives are running just digitally at the moment until i solved this. Do you have an email or something and should i ship the projekt to you? Do have experince in this 6ES7241-1CH30-1XB0 module?

Right now I'm in the office but after 6 o clock today I can look into the project. I have no experience with the Siemens modbus module 6ES7241-1CH30-1XB0. But I have experience with the ET modbus module and modbus in general.

Right now I'm in between a couple of hobby projects in my spare time and therefore I would like to look closer at your application since I havent worked with the '6ES7241-1CH30-1XB0' yet. I got TIA V13 (no sp1) at my hand so It would be quit convenient if the project was created in V13 ~.

I will send you an PM with my email so can we arrange the project from there.
 
Hi JBA-DK!
I have no experience with the RS485 module of the S7-1200 series, sorry!

What I can tell you is:

For the FC51 there is FC-Protocol and ModbusRTU protocol - no other bus options are possible.

Holding Register 2810 holds the Control Word
Holding Register 2811 holds the Reference Word (0-100% = 0-4000 hex)
Holding Register 2910 holds the Status Word
Holding Register 2911 holds the Main Actual Value (Speed of the motor)

You set:
Par. 8-30 - Modbus RTU
Par. 8-31 - Modbus address
Par- 8-32 - Baud Rate
Par. 8-33 - Parity and Stop bit

Par. 8-42.0 - Is locked to Control Word
Par. 8-42.1 - is locked to Reference Word
Par. 8-42.2 - here you can select one of the available parameters from the offered list
Par. 8-42.3-15: same as above

Par. 8-43.0 - Is locked to Status Word
Par. 8-43.1 - Is locked to Main Actual Value
Par. 8-43.2 - Here you can select one of the available parameters from the offered list
Par. 8-43.3-15: same as above

Each of the above mentioned parameters is represented as a Holding Register on the Modbus RTU channel.
Par. 8-42.0 is HR2810 (as mentioned earlier)
Par. 8-42.1 is HR2811 and so on
Same for
Par. 8-43.0 is HR2910
Par. 8-43-1 is HR2911

If you need a parameter that is 32 bit (You can see what each parameter is, as well as the conversion type for it in chapter 5.2.5 of the programming guide). You will have to map the parameter twice.
E.g. Par. 3-41 Ramp 1 Ramp up time, this is a 32 bit value with a conversion index of -2. -2 means you have to multiply the value you send to the drive by 100 (and of course divide when you read it).
if you are not going above the value possible in a 16 bit Int, you do not have to map it twice. So take Par. 3-41 Ramp 1 Ramp up time, this is a 32 bit value. But if you only need to send 4.50 sec. to it you will map the parameter in Par. 8-42.2 and send 450 to it. 450 is because the parameter has a conversion index of -2 and this means it is a 2 decimal number, but represented by a whole number value.

If you need a value that is higher than 655.35 sec. then you map the parameter in Par. 8-42.2 AND par. 8-42.3. This will give you the low word in HR2812 and the high Word in HR2813.
Same goes for Reading, and remember to always start the 32 bit mapping in an even numbered parameter as this is the only way it will work (e.g. xx.2 or xx.4 or xx.6).

Depending on your controller you may need to subtract 1 from the HR number mentioned here, it is a question about where the numbering starts. In rare cases there is also the need to add a 4 in front of the HR number (e.g. 42810).

For all Danfoss Drives that use the danfoss standard control profile (also named FC-profile) you send 0x43C for stop, 0x47C for start and 0x87c Start reverse.

A stop signal will always have the highest priority, and this means that if you do not have a signal on T27 the drive will coast (by default T27 is set to coast inverse).
It is possible to control the relation between digital and bus in Par. 8-01, here you choose if you want to control by both bus and digital or one of the other.
In Par. 8-5x, it is possible to control individualt input and control word bits interaction.
 
I had a friend helping with this a year ago. I think my problem was pointing to the datablock correctly. P#DB40.DBX4.0 instead of just DB40.DBX4.0 at the PTR on my mb master block.
 

Similar Topics

Hi all, I am trying to do Modbus communications via the CB1241 RS485 Communication Board on a Siemens S71200 PLC. I am using a 1215C CPU. After...
Replies
6
Views
238
Hi there I am new with this thing and i don't know how to connect Allen Bradley Micrologix 1200 PLC to Raspberry Pi using USB to RS485 in NodeRED...
Replies
3
Views
2,266
I have an existing Micrologix 1200 that read some analog values off of temp and dewpoint sensors. I want to replace the current sensors with new...
Replies
5
Views
1,903
Hi all. Are someone was tried to connect HMI with only serial port ( rs232/485 ) to a PLC (S7-1200 + CM 1241 RS485 ) I have a machine, where is a...
Replies
0
Views
1,240
Hi all, I've hit a bit of a brick wall and need some help. I'm currently trying to get a Siemens S7-1200 PLC to talk to an Eaton DE1 Drive I'm...
Replies
8
Views
3,667
Back
Top Bottom