18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

A forums to allow bugs and problems with Flowcode v7 to be reported and resolved.

Moderator: Benj

Post Reply
lordhex
Posts: 54
Joined: Mon Dec 30, 2013 2:09 am
Has thanked: 15 times
Been thanked: 10 times
Contact:

18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by lordhex »

Hello Benj i found a small bug.
i made 4 swicth to input adress of slave in 16F877A and it is working.
Then i tried better mikrochips.
18F25K80 and 18F24K22
Both of them can work in simulation but
IF=i put the slave adress direct real life it is working.
But if i tried to put the adress by switch in simulation it is working but in real life it is not working.

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by AbhijitR »

Hello!

Kindly excuse if I have posted my doubt/problem on a wrong thread, I see no one answered LORDHEX.

May I request someone to point out the mistake I am doing or there is some other problem. I tried using PIC18F25K42 with one I2C display (gLCD_SSD1306_i2c1), one MODBUS slave and three Analog Inputs, the compilation ends up with errors on contrary if I change the chip to PIC18F25K80 the compilation returns with success.

Kindly help me to understand.

Regards
Abhi
Attachments
Trial_18F25K80.fcfx
(13.6 KiB) Downloaded 237 times
Trial_18F25K42.fcfx
(13.6 KiB) Downloaded 234 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by QMESAR »

Hi
your 18F25K42 compile fine with me in FC 7
see screen printbelow

Did you install the latest updates for FC 7 from here
http://www.matrixtsl.com/mmforums/viewt ... 63&t=19743
P1.jpg
P1.jpg (135.41 KiB) Viewed 9639 times

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by AbhijitR »

Hi! QMESAR

Many thanks for your quick reply, kindly excuse me I forgot to mention the version, presently I am using FC8.0.0.6, may be FC8 is not compiling well or may be some update is missing.

Regards
Abhi
Attachments
Flowcode8.jpg
Flowcode8.jpg (68.93 KiB) Viewed 9635 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by QMESAR »

HI
Ok you posted in the FC 7 forum please post in the FC8 forum next time around :D .

Your code (FC chart) compile fine for me in FC8 V8.1
Please update to FC V8.1 and try again
P1.jpg
P1.jpg (129.5 KiB) Viewed 9630 times

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by AbhijitR »

Hi! QMESAR

Great I am happy to hear that the flowchart complied well on your machine with FC8, so now I am sure that the problem is because my FC which is not updated.

For your knowledge, I tried updating my FC8 in the past but unfortunately it do not work, bellow is the process I follow,
Under HELP tab there is an option "Check for Updates...", every time I run this option it returns with "no updates available", so either I am doing something wrong or I don't know the correct protocol to check for updates.

May I request you to help me through.

Thank you, hear you soon.

Regards
Abhi

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by QMESAR »

Hi

To update to FC8 V8.1 you have to go an download it from the web page ,FC does not update to 8.1 from the update system and you will not get any notice about updates in the updater as it is blocked so to say. deinstall the old FC download 8,1 and install it and your issue is solved

Good luck

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by AbhijitR »

Hi! QMESAR

Kindly excuse for the delayed reply, following your previous post, I uninstalled the FC8, downloaded/installed the FC8.1 and again tried to compile but unfortunately the same error, may I request you to check the properties I have set for the Display as well Modbus and Project Option too.

One more thing I observed, when I select the device PIC18F25K42, the I2C and UART, receives additional pins to select from the drop down menu in the properties window, I think something goes wrong over there, but I do not understand where and why.

Thank you, hear you soon.

Regards
Abhi

NOTE: in my previous post (Jan 23rd) the FC for PIC18F25K42, I forgot to change the device to PIC18F25K42 from PIC18F25K80, from the Project Option.
Attachments
Compiler_Message_26-01-2019.jpg
Compiler_Message_26-01-2019.jpg (80.07 KiB) Viewed 9591 times
Trial_18F25K42_26-01-2019.fcfx
(13.01 KiB) Downloaded 251 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by QMESAR »

Hi

I checked your flowchart and to me there is a configuration/definition error for the chip in Flowcode (cal components).
The team will solve this for you or Martin :D

@Team
below the compiler errors with MODBUS not active only LCD then the I2C errors are shown second time around gLCD not Active MODBUS
errors caused some strange reports :D
P1.jpg
P1.jpg (124.24 KiB) Viewed 9582 times
P2.jpg
P2.jpg (69.89 KiB) Viewed 9582 times

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by AbhijitR »

Voila!

Many many thanks for the efforts my friend, I am sure Ben (team) or Martin for sure will find some answer.

Cheers...

Regards
Abhi

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1287
Joined: Sun Oct 05, 2014 3:20 pm
Location: Russia
Has thanked: 384 times
Been thanked: 614 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by QMESAR »

Hi
You are welcome :D

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by AbhijitR »

Hi! Ben (Team) and Martin

May I request you to shed some light on my above post.

Thank you, hear you soon.

Regards
Abhi

User avatar
Benj
Matrix Staff
Posts: 15312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4803 times
Been thanked: 4314 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by Benj »

Hello,

The topic is a bit strange. It details the k80 devices and K22 devices but reading the text the problem is with a k42 device. Looks like it's maybe a hijacked topic.

Anyway looking at the K42 device datasheet it looks like the registers for I2C/SPI etc have been completely re-done so we will have to spend some time re-working the FCD and CAL to suit. Do the K22 and K80 devices have similar issues?

I'll try and get on with this later this week, for now you might want to use a different device if that is an option.

User avatar
AbhijitR
Posts: 298
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 279 times
Been thanked: 78 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Post by AbhijitR »

Hi! Ben

Kindly excuse for the hijack, :(

To be honest I tried to learn/read from the forum regarding the PIC18F25K42 and PIC18F25K80 but I did not find any relevant topics with MODBUS and I2C reference.

Regarding the ***K22 device I am not aware, instead ***K42 was the option in front of me, unfortunately ***K42 do not compile well, rather generate an error.

So I tried to check ***K80, no doubt it complied well but the device is not available with my supplier for the moment (MOQ problem) so I insisted to use ***K42 but there is some compilation problem, I hope it will get resolved soon.

Thank you, hear you soon.

Regards
Abhi

Post Reply