18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

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

Moderator: Benj

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

18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby lordhex » Fri Jul 07, 2017 12:45 pm

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: 72
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 93 times
Been thanked: 15 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby AbhijitR » Wed Jan 23, 2019 7:47 am

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 36 times
Trial_18F25K42.fcfx
(13.6 KiB) Downloaded 37 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby QMESAR » Wed Jan 23, 2019 9:17 am

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

Did you install the latest updates for FC 7 from here
viewtopic.php?f=63&t=19743

P1.jpg
P1.jpg (135.41 KiB) Viewed 1845 times

User avatar
AbhijitR
Posts: 72
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 93 times
Been thanked: 15 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby AbhijitR » Wed Jan 23, 2019 11:02 am

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 1841 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby QMESAR » Wed Jan 23, 2019 3:10 pm

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 1836 times
These users thanked the author QMESAR for the post:
AbhijitR (Thu Jan 24, 2019 6:01 am)
Rating: 5.26%
 

User avatar
AbhijitR
Posts: 72
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 93 times
Been thanked: 15 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby AbhijitR » Thu Jan 24, 2019 6:00 am

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: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby QMESAR » Thu Jan 24, 2019 7:49 am

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
These users thanked the author QMESAR for the post (total 2):
medelec35 (Thu Jan 24, 2019 8:20 am) • AbhijitR (Sat Jan 26, 2019 5:22 pm)
Rating: 10.53%
 

User avatar
AbhijitR
Posts: 72
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 93 times
Been thanked: 15 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby AbhijitR » Sat Jan 26, 2019 2:01 pm

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 1797 times
Trial_18F25K42_26-01-2019.fcfx
(13.01 KiB) Downloaded 38 times

User avatar
QMESAR
Valued Contributor
Valued Contributor
Posts: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby QMESAR » Sat Jan 26, 2019 5:47 pm

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 1788 times



P2.jpg
P2.jpg (69.89 KiB) Viewed 1788 times
These users thanked the author QMESAR for the post:
AbhijitR (Sat Jan 26, 2019 6:49 pm)
Rating: 5.26%
 

User avatar
AbhijitR
Posts: 72
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 93 times
Been thanked: 15 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby AbhijitR » Sat Jan 26, 2019 6:48 pm

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: 1127
Joined: Sun Oct 05, 2014 3:20 pm
Has thanked: 347 times
Been thanked: 555 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby QMESAR » Sun Jan 27, 2019 7:15 am

Hi
You are welcome :D

User avatar
AbhijitR
Posts: 72
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 93 times
Been thanked: 15 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby AbhijitR » Tue Jan 29, 2019 12:00 pm

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: 14312
Joined: Mon Oct 16, 2006 10:48 am
Location: Matrix TS Ltd
Has thanked: 4404 times
Been thanked: 4128 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby Benj » Wed Jan 30, 2019 5:58 pm

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: 72
Joined: Fri Nov 07, 2014 12:48 pm
Location: Pune, India
Has thanked: 93 times
Been thanked: 15 times
Contact:

Re: 18F25K80 AND 18F24K22 MODBUS SLAVE PROBLEM

Postby AbhijitR » Thu Jan 31, 2019 12:22 pm

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
These users thanked the author AbhijitR for the post:
Benj (Thu Jan 31, 2019 6:30 pm)
Rating: 5.26%