(you are viewing a thread; or go back to
list of threads)
Modbus RTU on LDmicro (by Evan Raftery)
Has anyone written a code in LDmicro for modbus as a slave in PIC16F887.
I have looked at the instruction length and it seems that once the code is written there would not be much room for anything else.
If not 16F887 would the ATMEGA128 be suitable?
(no subject) (by David R)
I would love modbus as well, but I think it would be A lot of work for Jonathan inside the program as there is so many ways of using modbus and how the data is processed,master,slave, etc.
I might be wrong but I think It can't be done using the ASCII commands as the 'CRC' system is different to ASCII.
Regards,
David.
(no subject) (by Evan Raftery)
I was thinking along the lines of constructing the code within the ladder format. There is two forms of modbus that can be approached. It can be done using ASCII with LRC being used for error check. The other form is RTU. This is done with timers and uses the CRC system. The time spacing between words is 3.5 char and is checked with timers.
What seems to be a difficult area is the addressing for the coils, inputs & holding registers etc. For example holding registers begin at 400001. Will the contents be accessed by the address name or is their another way of identifying registers in the PIC r AVR. Any ideas on this?
Regards
Evan
(no subject) (by David R)
I don't know of any gear that uses the ASCII Modbus only RTU.
How do you get arround not having the CRC as the other station will not respond if it see A CRC error.
Regards
David.
(no subject) (by Evan Raftery)
Redlion Datastations use either ASCII or RTU in slave or master mde for both.
The CRC reporting may have to be synthesised to give affirmative response in the beginning & hope for the best (bad I know). Probably by keeping baud rate down at say 9600 or 4800 it may function with PIC.
I have done a bit of searching and there is no standalone modbus IC to my knowledge
I did find however this link
http://www.protocessor.com/tec..._Modbus_RTU_Source_CodeDL.html
with free source code for PIC18 which could be rewritten for PIC16
I have attached file with relevant internal source codes etc that I found on the site if anyone can do something with it.
(no subject) (by Jonathan Westhues)
It would be possible to do the Modbus protocol just in ladder logic, including stuff like the CRC; but not in any way practical, and maybe not within the timing constraints.
Real Modbus support might be useful; but that would require actual support in the compiler.
(no subject) (by Evan Raftery)
Yes it looks feasible in ladder but would be ugly & require compromises on reliability.
Modbus support would be fantastic. Even if it took up most of the program memory it would allow transmission of converted analogue signals, give serial remote IO capability and even allow connection to HMI's etc
I have a modbus network here setup ready to test LDmicro 2.2 beta & have ordered 3x MAX485 chips.
I am begging now!
Modbus will be fine (by Joao Pereira)
""I have a modbus network here setup ready to test LDmicro 2.2 beta & have ordered 3x MAX485 chips.""
where we can download the 2.2 beta LDmicro
(no subject) (by Evan Raftery)
I was being pre-emptive (Australian type humour) and you would have to ask Jonathan when 2.2 will be released.
Jonathan mentioned Modbus support would be best implemented from within the compiler and I started begging :-)
I understand it may not be practical from a logistics viewpoint however as interfacing for the different micro's may be a gargantuan task.
It would be nice though.
(no subject) (by David R)
That is funny !!!, close to New Zealand humour.
Regards
David.
(no subject) (by napalm0)
The MODBUS RTU will considerably enrichs the LDMicro compiler, in that way it will grow up to industrial-like compilers
(no subject) (by kendhill)
the table used to create the lrc part needs to be reduced in size becouse it would take up a large area: the crc is a 2's compiment calculated by size and data;
i think the table could be made smaller becouse the lrc is a repeating pattern:
jest a though on maybe adding modbus ;maybe commands 1-6 and some others;
have a great day all
kendhill
Sonar detector for tetection web break on prtinting machines (by maximus)
I have programed ld micro for detection off paper web break, for rescue damage in silinder printing.And iwant make disply for this program but i don't now to make it
can any body correction this ld, and give me some program for dispaly matching measuring detection and seting.....
thank's
maximus
sonar (by maximus)
here I'm programmed sonar detection.....
Can you correction this LD...?
modbud (by maximus)
Can any body send modbus rtu communication between 2 or more avr atmega 128 ....?
Thank's
modbus rtu (by sadi)
please send me source of 16 digital output modbus rtu with ldmicro and atmega8
modbus rtu (by sadi)
please send me source of 16 digital output modbus rtu with ldmicro and atmega8
(no subject) (by José)
ldmicro does not support modbus.
Post a reply to this comment:
|