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: A few questions about functions in ESD 4.5  (Read 413 times)

LOstrander

  • Newbie
  • *
  • Posts: 8
    • View Profile
A few questions about functions in ESD 4.5
« on: April 08, 2019, 07:51:43 PM »

I am trying to design a program in Eve Screen Designer 4.5 to act as the HMI for a larger machine.  In have the basic GUI laid out to where I can navigate screens and the like.  The issue I'm running into now is performing actions in the background based on user input.

I guess the main question I have is how the functions interact with the rest of the system "flow."  If they don't have a call, do they just run continuously on the page, or only when the page is first activated?  Can variables persist across several pages, or are they "destroyed" when you leave the page they were created in?

I've looked at some of the example programs, but I'm not exactly following what's going on in them.

There are 3 major things I'd like the HMI to do when commanded:

1. Keep track of what language was selected by the user and display the corresponding text on each page (i.e. HOME in English and ZUHAUSE in German).  Preferably based on which button was pressed on the User Settings page.

2. Display text based on the contents of a text file.  Essentially, each time the user presses a left or right arrow, display the correct string of text in a label on the screen.  (I have a fairly good understanding of how to implement this, but again, would like it to persist across several pages)

3. Send/Receive data over SPI and perform a couple of functions (namely sending the new program info to the other controller and displaying any error messages received from it).

One other minor question is implementing a keyboard on the screen.  I saw an example program for the FT900 toolchain that creates a keyboard.  Can this be used in ESD?  For example, if I put it in the same folder and #include it in the function file, can it be called and displayed in the program?

For reference, we are using the ME812A WH50R screen and the MM900EV-LITE board in this setup.
Logged

scorpioprise

  • Newbie
  • *
  • Posts: 16
    • View Profile
Re: A few questions about functions in ESD 4.5
« Reply #1 on: April 09, 2019, 09:25:19 AM »

Hi, LOstrander, you are doing somewhat similar to my project, I have already passed to my custom board for this, but I'm using the Ft812 - Ft902 bundle like yours.

- You can implement the always running functions in the "update" slot of your screens. Else, if you need to call them once, put them in the start slot.
- Functions that don't interact with GUI are "useless" (let me say  ;) , I got your point) in this case. So can / must be in another place.

- Global variables, i'm sorry, I've done them the old way (editing code), so I can't help you.
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 261
    • View Profile
Re: A few questions about functions in ESD 4.5
« Reply #2 on: April 09, 2019, 02:34:55 PM »

Hello,

You can use the C file editor to make edits to the generated source code, allowing for MCU actions based on user input, please see the ESD user guide:
https://brtchip.com/wp-content/uploads/Support/Documentation/Programming_Guides/Modules/EVE/BRT_AN_021_EVE-Screen-Designer-4.0-User-Guide.pdf

The 'Variable Update' sample included in ESD 4.5 may also0 be useful for you.

As for the keyboard example, I would suggest having a look at the display list included in this and copying this into your code.

Best Regards,
FTDI Community
Logged

LOstrander

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: A few questions about functions in ESD 4.5
« Reply #3 on: April 09, 2019, 03:36:48 PM »


The 'Variable Update' sample included in ESD 4.5 may also0 be useful for you.

As for the keyboard example, I would suggest having a look at the display list included in this and copying this into your code.


I'm not really seeing anything related to a keyboard in the Variable Update example... (was there supposed to be an attachment?)


- You can implement the always running functions in the "update" slot of your screens. Else, if you need to call them once, put them in the start slot.
- Functions that don't interact with GUI are "useless" (let me say  ;) , I got your point) in this case. So can / must be in another place.

- Global variables, i'm sorry, I've done them the old way (editing code), so I can't help you.

Thank you!  I'll play around with these and see if I can get them working.

Semi-related note - can I throw text files from an SD card into the Resources folder to test accessing them?
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 261
    • View Profile
Re: A few questions about functions in ESD 4.5
« Reply #4 on: April 11, 2019, 09:12:31 AM »

Hello,

I was referring to the keyboard example in the FT900 toolchain.

Best Regards,
FTDI Community
Logged

LOstrander

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: A few questions about functions in ESD 4.5
« Reply #5 on: April 12, 2019, 09:52:32 PM »

I've been trying to incorporate the App_Keyboard code into my ESD file, but there seems to be a lot of differences in the Toolchain's Display Lists and those used by ESD.  Mostly I've found they're simply the Toolchain's functions/files with Ft_ placed in front, but there's one function in the example file I can't seem to find an ESD "alternative" for.  It's the App_Flush_Co_Buffer function called at the end of the Notepad() function.  What should I change that to so ESD recognizes it?

Thank you
Logged

FTDI Community

  • Administrator
  • Sr. Member
  • *****
  • Posts: 261
    • View Profile
Re: A few questions about functions in ESD 4.5
« Reply #6 on: April 16, 2019, 01:52:18 PM »

Hello,

The Ft_App_Flush_Co_Buffer function is defined as follows in the FT9xx toolchain example:

Code: [Select]
ft_void_t Ft_App_Flush_Co_Buffer(Ft_Gpu_Hal_Context_t *phost)
{
#ifdef  BUFFER_OPTIMIZATION   
   if (Ft_CmdBuffer_Index > 0)
     Ft_Gpu_Hal_WrCmdBuf(phost,Ft_CmdBuffer,Ft_CmdBuffer_Index);
#endif     
   Ft_CmdBuffer_Index = 0;
}

Best Regards
BRT Community
Logged