View previous topic :: View next topic |
Author |
Message |
secretagent
Joined: 29 Oct 2019 Posts: 3
|
Modbus_slave error |
Posted: Tue Oct 29, 2019 7:54 am |
|
|
Hi. I try modbus.c but build and after error. Can you help me ? |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Tue Oct 29, 2019 8:04 am |
|
|
It's very 'unclear' what you are actually doing.
ex_modbus_slave.c, is code that can be compiled directly. Doesn't need
another 'main'c'....
What is in your 'main'c'?.
What chip are your trying to use?.
What compiler version?. |
|
|
secretagent
Joined: 29 Oct 2019 Posts: 3
|
|
Posted: Tue Oct 29, 2019 8:17 am |
|
|
Ttelmah wrote: | It's very 'unclear' what you are actually doing.
ex_modbus_slave.c, is code that can be compiled directly. Doesn't need
another 'main'c'....
What is in your 'main'c'?.
What chip are your trying to use?.
What compiler version?. |
Hi.
I use the version 5.008
and I use the PIC16F886 |
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Tue Oct 29, 2019 8:21 am |
|
|
You haven't answered about what is in your man.c?.
Ouch on 5.008. That is a very early 'beta' V5 compiler and has a lot of issues.
However there is one other thing. What _language_ are you using?.
I remember PPUSE coming up before. It was a user who had a national
language that didn't use '.' for the decimal point. This causes issues
for quite a lot of code, and particularly the Modbus stuff.
In this case '.1' doesn't get parsed correctly, hence the error. |
|
|
secretagent
Joined: 29 Oct 2019 Posts: 3
|
|
Posted: Tue Oct 29, 2019 8:45 am |
|
|
Ttelmah wrote: | You haven't answered about what is in your man.c?.
Ouch on 5.008. That is a very early 'beta' V5 compiler and has a lot of issues.
However there is one other thing. What _language_ are you using?.
I remember PPUSE coming up before. It was a user who had a national
language that didn't use '.' for the decimal point. This causes issues
for quite a lot of code, and particularly the Modbus stuff.
In this case '.1' doesn't get parsed correctly, hence the error. |
you can show this main file project wizard automatically ...
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19545
|
|
Posted: Tue Oct 29, 2019 9:13 am |
|
|
You do not want that. The ex_modbus_slave.c already has it's own main.
You simply compile this directly. No other 'main' needed.
What is your decimal separator?. If it is not '.', then you should consider
changing it to '.' to get the code to work. |
|
|
|