FTDI Community

Please login or register.

Login with username, password and session length.
Advanced Search  

News:

Welcome to the FTDI Community!

Please read our Welcome Note

Technical Support enquires
please contact the team
@ FTDI Support


New Bridgetek Community is now open

Please note that we have created the Bridgetek Community to discuss all Bridgetek products e.g. EVE, MCU.

Please follow this link and create a new user account to get started.

Bridgetek Community

Author Topic: EVE Designer - showing Variables of FT900 in display  (Read 16214 times)

sanjuro

  • Newbie
  • *
  • Posts: 3
    • View Profile
EVE Designer - showing Variables of FT900 in display
« on: August 21, 2018, 02:56:11 PM »

Hello,

i´m designing my first User Interface with EVE Designer.
I´ve followed many Tutorial Videos and the EVE 4.0 user guide.

The FT813 is controlled by a FT900 controller.
I can export my EVE Project, load it into eclipse, compile an then load it into the Controller. That all works.

The FT900 has several Sensors attached and i want to bring the actual values of
these sensors on the screen. How do i manage that? Do i use "ESD Functions"?
Inside EVE Designer i can create variables and everything. But how do i bring external values, that are created in the FT900 user code
into the user Interface.

One example:
I want  to control a labeltext by a function in my usercode on the FT900. How is that done?

Can anyone help nme with that?

Greetings,
Christian
Logged

FTDI Community

  • Administrator
  • Hero Member
  • *****
  • Posts: 892
    • View Profile
Re: EVE Designer - showing Variables of FT900 in display
« Reply #1 on: August 23, 2018, 01:51:09 PM »

Hello,

The ESD4 functions are currently only available for the display aspects of the application. At the moment, you would need to edit the code after exporting it in order to pass values from other external peripherals.

You can use the method shown in 'Add User Functions' in the ESD user guide or just edit the code directly after export.

One example of interaction between ESD and other MCU features is the Blink LED demo provided with the ESD4 software. This allows the GUI created to interact with GPIO on the FT900.

Regards, FTDI Community
Logged

JimmyD

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: EVE Designer - showing Variables of FT900 in display
« Reply #2 on: September 06, 2018, 07:15:43 PM »

Hi Christian

Did you crack it?  I have got some great screen graphics happening with rotating graphics etc but that's all based on the "CustomGauge" example which is basically showing the value of a counter! 

I'm too much of a newbie to work out how I get real world data (say the resistance of a pot) represented on the gauge or actually what I want to do is feed the FT900 some data over SPI from an Arduino...  As far as I can find none of the examples offer a scenario where the display represents data coming in... Only the one (LED) where the screen controls data output...

If you did solve your problem (which is essentially the same as mine) it would be great to get some pointers...

Cheers

Jimmy
Logged

scorpioprise

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: EVE Designer - showing Variables of FT900 in display
« Reply #3 on: November 28, 2018, 05:03:45 PM »

Hi Jimmy
Hi Christian

If you did solve your problem (which is essentially the same as mine) it would be great to get some pointers...

Cheers

Jimmy
I'm stuck on it too... did you get some updates?
I'm building a console & canbus driven display, and I'm trying my best to understand the way to pass data to screen.
Logged

scorpioprise

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: EVE Designer - showing Variables of FT900 in display
« Reply #4 on: November 29, 2018, 03:05:17 PM »

I DID IT  ;D ;D ;D ;D Hope You were stille following, but also for future readers.
So, that's easy, when you get it how it works!

Think in a "DataModel" way, that is "I store something somewhere, for who needs it"

Say you put something (the value) in a variable somewhere. Your variable will be updated somewhere in your code.
In my example, an event on UART0 toggles a boolean.

Then, here's the trick: find the label you want to change (will be named like you read in ESD), so you can search a  <PAGENAME>_<ESD_LABEL_NAME>_Text__Property

Pagename = FirstPage;
ESD_LABEL_NAME=CELL_VAL_1;

Now locate in <PAGENAME>__Generated.c file the

Code: [Select]
static const char * FirstPage_CELL_VAL_1_Text__Property(void *context);You will find it slightly different. Because you will find

Code: [Select]
static const char * FirstPage_CELL_VAL_1_Text__Property(void *context){return "ESD";}if "ESD" was the text you put via EveScreenDesigner.

Now implement it another way, like
Code: [Select]
int i=0;
static const char * FirstPage_CELL_VAL_1_Text__Property(void *context) {
   char * str;
   if (upcounting) {
      sprintf(str, "%d", ++i);
   } else {
      sprintf(str, "%d", --i);

   }

   return str;
}

And "magically" you're done! Because the EVE engine works for you, automatically refreshing the value read from somewere else.
Obviously you have to let it do so, leaving to it the update and render slots on your widgets.
Logged

pauljiao

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: EVE Designer - showing Variables of FT900 in display
« Reply #5 on: December 07, 2018, 07:14:34 AM »

Hi scorpioprise,  your way is a kind of hack method.  Another way I recommend is to :

  • Add a source file by right clicking the page "new->source" and give a file name such as "mainpage_user.c"
  • write your own function but need use ESD_FUNCTION built-in macro to let ESD aware of it, for example:

#include "Ft_Esd.h"
#include <stdio.h>



static uint32_t update_count = 0;
ESD_FUNCTION(getUpdateCount, Type = uint32_t)
uint32_t getUpdateCount()
{
   return update_count;
}

ESD_FUNCTION(readSensor, Type = ft_int32_t)
ft_int32_t readSensor()
{

   if (update_count ++ > 60*10){
      if (update_count > 60*20)  update_count = 0;
      return 0xFF00FF00;
   }
   else
      return 0xFFFF00FF;
      
}


After that, you will find the user functions at right side Library Browser of ESD.  Connect these two function with the right property of targeted widget. Here is one snap shot and ESD project example:



Logged

scorpioprise

  • Newbie
  • *
  • Posts: 18
    • View Profile
Re: EVE Designer - showing Variables of FT900 in display
« Reply #6 on: December 07, 2018, 11:24:49 AM »

ThankYou, pauljiao ,
your way is a kind of hack method. 
I understand it, but as far as my final sistem will have something like 150+ values, maybe working on the code side (Eclipse) will be the better approach, building the interface before and hacking after.

Nontheless, I'll give this strategy a try  ;)
Logged