formula allcode

For Formula AllCode users to discuss projects, programs, and any other issues related to the Formula AllCode robotics platform.

Moderators: Benj, Mods

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

Hello,
I am currently working with a 128G2 GLCD display connected to J5 of AllCode:
Screen Shot 05-23-18 at 03.11 PM.PNG
(15.04 KiB) Downloaded 6751 times
The program works; the connection is good and the display works well but when I open my file on my other posts the configurations of the component gLCD_EB075_4D1 change; "Baud option" is still at 9600 baud but "Baud Rate" is 57600: Bizard.
Screen Shot 05-23-18 at 03.09 PM.PNG
(5.92 KiB) Downloaded 6751 times
In addition the program does not work anymore! The reset is done well (I see it on the oscilloscope) but no signals on TX. Program remains stuck in function "gLCD_EB075_4D1 :: initializes"

Here is a zip file (FC.zip) in which you will find 2 test files: "flowcode1" that works and" flowcode "2 that does not work and yet the .fcfx source codes are the same. On the other hand, the generated .hex files are different.

Thank you for reviewing these two tests.
Best regards

Bruno
Attachments
FC.zip
(480.2 KiB) Downloaded 325 times

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: formula allcode

Post by Benj »

Hi Bruno,

Which version of Flowcode are you using, you can find the specific version number by clicking the Help -> About menu.

If you're using v7.3 then it might be worth trying the updates available here to see if they help.
viewtopic.php?f=63&t=19743

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

Hello Benj

I have version 7.3.0.5 of flowcode. I just followed the link given; should we also copy the 3 executable files: flowcodeV7.exe, flowcodeV7.3.0.5.exe, flowcodeV7.3.0.6.exe?
Screen Shot 05-25-18 at 01.45 PM.PNG
(5.05 KiB) Downloaded 6730 times
It is not specified on the link.

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: formula allcode

Post by Benj »

Hello,

Yes you can simply drop all files including the executables into the "Flowcode 7" folder. There are multiple executables to allow you to go back to a previous release version if you need to. FlowcodeV7.exe is the latest (7.3.0.6) so any existing shortcuts to the application will load the latest version.

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

Hello Benj,
I did the update with the file "FC7_Latest_Files_16-05-18.zip" and I tested with my students. it still does not work properly. The reset works well but the program remains stuck on initialization with several PCs and several GLCDs!

Thank you for your help.
Best regards
Bruno

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: formula allcode

Post by Benj »

HI Bruno,

Have you tried using the UART component from Comms to control the display. The display likely has a slightly different version of the 4D systems API onboard and so using the UART component you can tailor the commands to what the display requires.

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

I tested the communication with the tool "UART" and it works very well!
The problem is that in the two examples above, flowcode source files are the same with the same parameters for the GLCD display (transmission speed, software data flow, connection pins, ...).
It's during the compilation that I have a problem.
Here are two photos that prove it:
The setting of the left display is OK with flowcode1.fcfx but not with the flowcode2.fcfx file: the reset command works but the program remains locked in the "initialize" function as explained above ...
OK.jpg
OK.jpg (70.21 KiB) Viewed 14575 times
not OK.jpg
not OK.jpg (63.59 KiB) Viewed 14575 times
In the zip files of the two examples "flowcode1 and flowcode2 above, the hex files are not the same:
compare.JPG
compare.JPG (486.97 KiB) Viewed 14575 times
During my last sessions with my students, they all had more or less the concern: sometimes it worked and, during a change of computer station, it does not work anymore!
All my posts have been updated with the latest versions of flowcode as well as the file "FC7_Latest_Files_16-05-18.zip".
There is a problem with the component macro GLCD; the settings are not taken into account correctly.

Thank you for your help.
Best regards
Bruno

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: formula allcode

Post by Benj »

Hi Bruno,

Not sure what the problem is here, I've done a compare of the two Flowcode project files and they are significantly different.

Flowcode2 contains supplementary code and Flowcode1 contains two variables. Are these projects meant to be identical?
I tested the communication with the tool "UART" and it works very well!
You should be able to drive the entire display using the UART component, if the API has changed then the display component will currently no longer work (or only partially work) with your version of the display. Maybe we need to update the component for the latest API.

I'll add it to the list to have a look through and make sure we are fully compatible with the latest version.

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

Hello Benj,

I'm coming back to you for my problem of a year ago regarding the programming of the 4Dsystem OLED 128-G2 display.
This module works perfectly: the IDE interface and the communication protocol is not changed and it communicates perfectly.
Here are two examples of identical programming with the same settings of the components on the panel.
One works perfectly and not the other: we can notice that the two code files "c" are different at the programming levels of Rx and Tx. I think there is a problem in the file "gLCD_EB075_4D1.fcpx".
I would like to communicate with other system in UART but as long as this problem is not resolved, it is not worth it ...
Can you take a look?
thank you so much

Bruno
Attachments
Test.zip
(471.85 KiB) Downloaded 348 times
Cablage.pdf
(685.69 KiB) Downloaded 289 times

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: formula allcode

Post by Benj »

Hi Bruno,

The differences between the OK and PasOK projects seem to be the order in which the components have been added to the project.

The FA component uses UART channel 1 behind the scenes for the Bluetooth connection so there could be a clash going on here, have you tried using channels 2-4 instead?

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

when I open the files on my computer, the communication port indicated is the channel2 for both files!
Attachments
Screen Shot 05-22-19 at 04.21 PM.PNG
(231.56 KiB) Downloaded 4773 times

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: formula allcode

Post by Benj »

Hello,

Sorry for some reason when loading into v8 the channels had been reset to channel 1. I've checked again in v7 and you are correct they are set to channel 2.

Hmm very strange!! I'll have another look and see if I can spot anything else.

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: formula allcode

Post by Benj »

Right it does look like there is a problem.
Flowcode1_PasOK.c:384:0: warning: "MX_UART_TX_TRIS_1" redefined
Flowcode1_PasOK.c:82:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:386:0: warning: "MX_UART_RTS_PIN_1" redefined
Flowcode1_PasOK.c:84:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:389:0: warning: "MX_UART_RX_PORT_1" redefined
Flowcode1_PasOK.c:87:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:390:0: warning: "MX_UART_RTS_PORT_1" redefined
Flowcode1_PasOK.c:88:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:393:0: warning: "MX_UART_CTS_PORT_1" redefined
Flowcode1_PasOK.c:91:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:394:0: warning: "MX_UART_TX_PIN_1" redefined
Flowcode1_PasOK.c:92:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:395:0: warning: "MX_UART_RX_TRIS_1" redefined
Flowcode1_PasOK.c:93:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:396:0: warning: "MX_UART_RTS_TRIS_1" redefined
Flowcode1_PasOK.c:94:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:397:0: warning: "MX_UART_BAUD_1" redefined
Flowcode1_PasOK.c:95:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:398:0: warning: "MX_UART_TX_PORT_1" redefined
Flowcode1_PasOK.c:96:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:399:0: warning: "MX_UART_RX_PIN_1" redefined
Flowcode1_PasOK.c:97:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:400:0: warning: "MX_UART_CTS_TRIS_1" redefined
Flowcode1_PasOK.c:98:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:401:0: warning: "MX_UART_CHANNEL_1" redefined
Flowcode1_PasOK.c:99:0: note: this is the location of the previous definition
Flowcode1_PasOK.c:402:0: warning: "MX_UART_CTS_PIN_1" redefined
These warning are generated when you compile and I think I can see why. I'll have a play and see if I can solve the issue for you.

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

Hello Benj,
Have you had time to look at my problem?

Bruno

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: formula allcode

Post by Benj »

Hi Bruno,

It appears that the code generation is working correctly in Flowcode 8, the problem exists only in Flowcode 7 and looks to be something to do with the core workings inside Flowcode being able to detect an instance of the UART when inside a component (the FA component).

One workaround might be to have two UART components in your v7 project or the other workaround is to be careful about which component you add first to get the OK type situation.

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

Hello
I do not see how to set the two uart and the two displays on the same panel with the formula Allcode. Can you guide me?
thank you in advance.

Screen Shot 06-11-19 at 05.15 PM.PNG
(11.58 KiB) Downloaded 4418 times

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: formula allcode

Post by Benj »

Hello,

Please can you try this and see how you get on.
FA_2x_Display.fcfx
(11.43 KiB) Downloaded 217 times

sundgau
Posts: 78
Joined: Mon Sep 26, 2011 4:18 pm
Has thanked: 5 times
Been thanked: 10 times
Contact:

Re: formula allcode

Post by sundgau »

Hello Benj et thank you very much; everything is ok with your FA2x.fcfx file.
By cons, when I test my flowcodePasOK again in the file "test.zip"download/file.php?id=29394, the display does not work (The setting of the UART is not correct)!
And everything works again if I take your file.
How did you build your file; is the placement order of the components on the panel important? I would like to understand!
Bruno

Post Reply