Jump to content

Recommended Posts

Posted

Hi All

 

Not sure if I am posting this twice but I have a problem Modbus RTU

 

I have successfully set up communication between the drive and a V1040

If I ask for a parameter on the drive, such as maximum frequency, I get a value such as -14582763 instead of the expected 60hz.

If I change the value in the inverter the long number changes on the V1040 indicating that I am reading the correct parameter.

I have tried to store the value into an MI,ML and DW in case there is an issue with data length.

I know I need to read 2 MI to get the required result, could these be returned in the reverse order and if so how do I reverse these.

Any help would be appreciated.

 

Below is a Link to the modbus manual.

 

Regards

 

Denis

 

https://www.google.ie/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&ved=0CCEQFjAAahUKEwj1oPeorvjGAhVCjdsKHT3lDqM&url=http%3A%2F%2Fwww.danfoss.com%2FNR%2Frdonlyres%2F844E0F42-AB58-4EAD-A11B-BDAED985391D%2F0%2FModbusRTUOperatingmanual20111117.pdf&ei=DZi0VbXmBcKa7ga9yruYCg&usg=AFQjCNGatXumxxFsBLenfbhFo1XC4MqGjQ&bvm=bv.98717601,d.ZGU&cad=rja

Posted

Hi Denis,

http://206.72.118.208/legacy%20literature/6000/175R5467Rev0604VLT6000ModbusIM.pdf

Look for this document. It may be for other drive, but idea is the same.

Look table at page 9.

I hope this will work for you.

 

If this is not working - find coil/integer map for your drive model.

Hi Alex

 

I already have communication established and I am sure i have the proper address (when I change the value in the Drive it changes in the PLC)

the problem I have is that the returned answer does not match the expected value.

When I request frequency I should read a value of say 60, what i get is a large positive or negative number.

I need to read two MI values in the drive to get the value I need so I suspect the drive is sending 16 or 32 Bit.

Is there any way the PLC is reading the returned value in the wrong format.

 

Regards

 

Denis

Posted

It is strange, that you have to read 60 HZ as 16/32 Integer.

 

Is it possible that drive keep frequency as 32 bit Float Point?

 

Please set 60 HZ and then 50 HZ and read what drive send.

 

Is this any indicator, which show frequency at VFD itself? LCD for example?

 

You can do next test:

Set MF at PLC to 60 HZ or 50 HZ, and copy MF to DW. Then look at DW Bytes in HEX. Do you see numbers, similar to what VFD send?

If yes - you can see how you can swap byted to have right number.

 

I hope this helps.

Posted

Thanks Alex

 

I will be working on this during the week.

I am only reading from the inverter not writing to it.

I do not know exactly what the drive sends, but I remember that it was a very large positive or negative number.

I know I am reading the correct parameter because when I change the parameter in the drive it changes in the PLC.

If I change any other parameter the PLC does not change.

When I get back to this I will post exactly what I get when I set the parameter to 50 and 60.

 

Thanks for your suggestions.

 

regards

 

Denis

  • 1 year later...
Posted

Hi All
I have a problem with testing a Modbus RTU via RS485 on V130 as master and Danfoss frequency converter FC280. I made a PLC simple program to test write and read with modbus. 
Till now I did not use modbus serial comunication with frequency converter. Even a Unitronics PLC is not my strong range but I have been working with a Danfoss FC280 quite a lot. 
I see LED triping for comunication on FC280 when I press a F1 or F2 Buton on V130. But I stil can get a result.
Pleas any help.

Modbus FC280_pop1,1.vlp

  • 4 weeks later...
Posted

Hello

I change the ID address of the master/slave, as Gabriel Franco said. I also change the the other modbus parameters to: 9600,8,E,1.
But its still does not work. Not to read or write. If I go to boot menu on V130, see under the Comunication Port1 that Rx and Tx was sended. But there is nothing now not a Led tripping on frek. converter. I was waiting for new cabel 6/6 I was thinking maybe is a problem in cabel but it is the same with new cabel. Please any advice or suggestion.

Modbus FC280_pop1,2.vlp

  • Like 1
Posted

I change the COM INIT block and also change the Modbus configuration to 57600, 8,n,1,N. And do the same in FC. ID of slave is 2. I have the jumper on V130 for RS485 an termination ON. The termination on slave is OFF. I also try to swapping the two outer pins of the com cable. I can see that the telegarm have been send in PLC. And on FC the Bus message count chenge, when ever I press the F2 button on PLC. But the reference on FC, what I want to regulate, does not change. The parameter to change this in Danfoss FC parameter is 3-10. Modbus 4x Holding Register (decimal) for that parameter is 3100. If we want to change the parameter to 10%, we need to set the value 1000 (INT 16). I tried to change the frequency converter, but my PLC program does not work on non of them.

Modbus FC280_pop1,3.vlp

Posted

Hi,

 

I noticed in the application that you are trying to read from address 16130 in length of 10.

According to the Excel file you attached before the next address after 16130 is 16140.

if the frequency register is 16 bit then you need to set the length to 1 , if the frequency register is 32 bit then you need to set the length to 2.

 

 

  • MVP 2023
Posted

Hi Afterall,

I haven't looked at your program, but some points to ask:

Why slave termination off?

Have you tried 9600, 8 N 1?

Have you tried to communicate with the Danfoss using Modbus Poll etc to confirm numbers, instructions, sequencing etc?  If you can get it to work with this, then you can apply results into the PLC parameters.  Easier with Mbus poll initially.

cheers,

Aus

Posted

Hi,

I tried to change the vector length: 1(dec), 2(dec), 10(dec), 16(dec)   and all this with hex. I tested termination on FC Off/On. If I press the F1 or F2 button to send telegram, I see on FC that the Bus message count increase for 3, because the master did 3 retries but increase also a Slave error count. If I change the slave ID on FC, there is no message on this FC, just in a bus massage. That means the FC received the telegram. There must be some error, but I cant find it. I do not have the Modbus Poll licence. I did some tests with coils in modbus and FC, some times ago. And that time works corect. Does anybody see the solution?

  • MVP 2023
Posted

Afterall-

What's a Modbus Poll license?

This thread has run for a while and you've tried a lot of things.  We still don't know which end the problem is on  - the Unitronics side or the Danfoss side.  Unitronics Vision series can be tricky to set up Modbus on as you have to write your own code to make sure the Modbus task isn't busy, as well as make sure the Rules of Modbus are being followed, as Ofir pointed out.

I'm afraid you're going to have to set foot in advanced troubleshooting land and do some testing using known software on a PC to gather some known information.  With this you can hook the two sides together.  You want to use a PC because the addresses, lengths, and COM port parameters are super easy to change to try different things.

1.  Go online and order a USB to RS485 converter for your computer.  A quick Google search produced this: http://www.usbgear.com/GM-485422.html  but any one with terminals will do.

2.  Here are links to limited use Modbus Master and Slave programs that you can download for free:

Master: http://www.simplymodbus.ca/RTUmaster.htm

Slave: http://www.simplymodbus.ca/RTUslave.htm

3.  Establish communication between Unitronics and the Slave PC program.

4.  Poll the Danfoss with the Master program.

5.  Let us know what happens.  Post any code that works or doesn't with questions.  

 

I bought a PC-based Modbus program years ago and it remains one of my best troubleshooting tools.  If anyone is interested I use this one - https://www.calta.com/mdbus.htm

I get no compensation for this.  I am just an extremely satisfied customer.

Joe T.

  • MVP 2023
Posted

I'm also assuming that you have fully read the MG07B202 manual from Danfoss, starting at page 59  "Modbus RTU".  There is lots of info there, and also lots of initial settings that have to be right for things to work.

And +1 to all of Joe's stuff above.

cheers,

Aus

Posted

I've tried to test the communication with ADAM  USB to RS485 converter and Modbus master. And that really helps me. I finally find the solution. I did quite many mistake in my PLC code on master and also in the slave side. In the past posts I attached the unworking PLC codes. Now I post the code thats works if anybody in the future will need this, and delete the old attaches. Thank you all.

Modbus FC280_pop1,4.vlp

  • MVP 2023
Posted

Thanks for the update!

It sounds like you've learned some of the secrets of Modbus troubleshooting.  You can't beat an external program and a 485 converter to find the gremlins.

Joe T.

 

  • 2 years later...
Posted

Interesante,  en general manipulo equipos Danfoss comunicados con PLCs así como sus diferentes comunicaciones que dispone,  en este momento me encuentro con un Unitronics V350-J  utilizare Modbus para controlar mi FC-302 ya que es compatible.

Tomare en cuenta los comentarios anteriores ¡geniales todos¡, iniciare con el desarrollo de la aplicación.

  • 4 months later...
Posted
On 18/4/2017 at 17:12, Joe Tauser said:

En el bloque COM INIT, desactive Control de flujo e Ignorar interrupción. La señal RS485 se encuentra en los dos pines externos del cable com; intente intercambiarlos.

Joe T.

En este caso tengo una aplicación en desarrollo de Modbus RTU, de forma breve dentro de mis MI del sistema e ingresado a mi PLC V350 al realizar la lectura de algunos parametros de un varidador Danfoss en MI asignadas solo me aparece el valor(5) eso que me esta indicando

  • 2 weeks later...
Posted
On 7/12/2019 at 0:57, Joe Tauser said:

Si obtiene un valor de 5, entonces el comando Modbus está agotando el tiempo de espera. Publique su código para que podamos echar un vistazo.

Joe T.

Buenos días Joe T.

El código correspondiente es:

  • Imagen 1 y 2: Solo estoy utilizando el puerto que trae de fabrica (no tengo la tarjeta adicional). En este caso activo y desactivo el puerto cuando requiero programar el PLC.
  • Imagen Com: Es la configuración que tengo en el PLC puerto serial.
  • Imagen Config y rhr: Referentes a la configuración del Com, y la siguiente es respecto a la lectura que pretendo realizar al variador Danfoss.  

De igual manera anexo los datos que tengo del FC-302 Danfoss .

  • Configuración del puerto Com.
  • Referencia que pretendo leer del equipo.
  • La lectura que hace referente.

Hago una observacion que en la imagen no aparece el parámetro 8.30 donde muestra que se encuentra en Modbus RTU , pero físicamente en el equipo esta seleccionada la opción.

Dentro de mi FC-302 mi ID 843.0 hace referente a espacio disponible para leer parametros en Modbus RTU.

  • 843.0 es lectura de parametros, en este caso lee el parametro 1603 en realidad lo tengo configurado para leer el 1685(que es un valor en hexadecimal).

En base al manual del fabricante Danfoss Modbus RTU, indica que para hacer lectura de los parametros la lectura corresponde a 843.0 corresponde a 2910 por esta referencia es que en el PLC trato de leer este parametro, e realizado pruebas de igual manera en 42910 como lo marca el manual pero solo recibe en las MI un valor (4 y 5). E realizado este tipo de red en PLC Siemens, Allen Bradley y otros aparatos y no e tenido problema alguno con las mismas referencias que  mencione anteriormente, pero en este caso no comprendo el error que surge.

 

Anexo la liga del manual página 18:

 http://documentlibrary.xylemappliedwater.com/wp-content/blogs.dir/22/files/2015/02/Modbus-RTU-Standard-IM.pdf

De ante mano agradezco la atención, sigo realizando pruebas pero aun  me encuentro sin excito.

1.jpg

2.jpg

com.jpg

conf.jpg

rhr.jpg

fc 302 puerto.jpg

lectu.jpg

lectura fc.jpg

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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.