General Category > Discussion - Software

A few questions about functions in ESD 4.5

(1/2) > >>

LOstrander:
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.

scorpioprise:
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.

FTDI Community:
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

LOstrander:

--- Quote from: FTDI Community on April 09, 2019, 02:34:55 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.


--- End quote ---

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


--- Quote from: scorpioprise on April 09, 2019, 09:25:19 AM ---
- 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.

--- End quote ---

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?

FTDI Community:
Hello,

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

Best Regards,
FTDI Community

Navigation

[0] Message Index

[#] Next page

Go to full version