Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Tue Nov 21, 2017 8:28 pm

All times are UTC - 7 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: G55 slow +error
PostPosted: Sun Nov 20, 2011 7:27 pm 
Offline

Joined: Thu Aug 09, 2007 4:44 pm
Posts: 67
SO I finally loaded this program I've written in Qlarity on to the actual G55 device after running it in the simulator for a while, and the first thing I notice is how much slower it is. This will be fine for the most part, but It is quite difficult when dynamically resizing the width of ButtonV2 objects I have on screen. I have a keypress set to repeat by using a timer every 40ms -100ms when the the button is held down, and this increments the width or position of an object up or down depending on which arrow key is pressed. It is very slow to update the screen, I often have to wait a second or two after releasing the button to see what position the button ended up in. Also, if I hold the button down for more than a second or two I am getting some kind of crash that does not occur in the simulator, where two buttons appear at the bottom of the screen, presumable asking me to dismiss or reboot. The text is far too small to read, so I don't know what the error is.

Is there perhaps a less processor intensive way to dynamically resize an object on screen? I'm thinking of using a Line object instead that I change the xpos when a button is pressed. Perhaps also I could increase the increment in xpos the longer a button is pressed instead of increasing the frequency of the timer firing... maybe this will reduce processor usage. Or is there another way to repeat clicks when a button is held down (im using hotkeyv2 to interpret these keypresses) that might work better?

Also, any general tips for increasing performance on a G55?

thanks,

Aaron


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Mon Nov 21, 2011 7:24 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
There are a number of tricks you might try, I will list a few off the top of my head.
  • Use BDF fonts where possible. While BDFs are a fixed sized font, they have vastly better rendering performance.
  • If you are moving the focus rectangle on every button repeat, try only moving the focus rectangle on release. Or hiding on press and moving/showing on release.
  • This one is similar to your thoughts -- instead of resizing the button on every press event you could do the following: Add a global MSG_DRAW handler. Normally this would do nothing, but on the resize-keydown you could set it up to draw an outline of your new button size/location (when pass==true). On button release you would tell the global MSG_DRAW handler to again draw nothing and perform the actual resize.
  • Consider trying using a QTERM-G56 or G58. The G56/G58 have the same dimensions and general specifications as the G55, but are roughly three to four times as fast at running Qlarity code. (Of course the G55 is less expensive, so take this one under advisement).
  • In general, it is a good idea to keep in mind that the G55 has a 72 MHz CPU -- it isn't going to keep up with the 3Ghz cores on a desktop CPU.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Mon Nov 21, 2011 9:14 am 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
It might also be useful to read the 2nd part of this FAQ about the Qlarity Engine which may give you some ideas on what the capabilities of the G55 are.
viewtopic.php?f=4&t=164

Also make sure your Draw Cache is set to Enabled or ALL if possible. The 2nd part of this topic discusses draw cache settings.
viewtopic.php?f=4&t=421

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Mon Nov 21, 2011 9:51 am 
Offline

Joined: Thu Aug 09, 2007 4:44 pm
Posts: 67
Thanks jeremy and ron,

I will look in to all of those options. In the mea time,is there any way to tell what error code the G55 is giving me, because the message is too small to be readable.

aaron


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Mon Nov 21, 2011 9:56 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
In Qlarity Foundry, select your ExceptionDisplay object (from the object tree) and adjust the font and ptsize properties to something legible.

If you have questions about the specific exception that is generated, be sure to include the description string.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Mon Nov 21, 2011 2:22 pm 
Offline

Joined: Thu Aug 09, 2007 4:44 pm
Posts: 67
Jeremy,

Thanks, I'll change the font size and see if I can identify the error.

Can you give me some example code of what the global MSG_DRAW handler might look like?

Thanks

Aaron


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Tue Nov 22, 2011 2:38 pm 
Offline

Joined: Thu Aug 09, 2007 4:44 pm
Posts: 67
Jeremy,

In addition to some example code of what the global MSG_DRAW handler might look like, could you tell me how to hide the focus upon a keypress. I tried setting disallowfocus=true temporarily but the focus rectangle stays active around the outline of the object as it appeared when the key was pressed. I would like it to just disappear.

Thanks,

Aaron


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Tue Nov 22, 2011 2:52 pm 
Offline

Joined: Thu Aug 09, 2007 4:44 pm
Posts: 67
OK... I found the KeyPadSettingsV2 property FocusStyle and set it to none... this worked.

Aaron


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Tue Nov 22, 2011 2:56 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
What I was thinking was making sure you don't call _keySetFocus() on for each repeat (only call it on release) ought to improve performance. Combine that with the FocusStyle set to None ought to improve performance somewhat.

The Global MSG_DRAW handler suggestion is one of the more tricky ones. Lets only go down that route if the other stuff doesn't help sufficiently.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Tue Nov 22, 2011 3:20 pm 
Offline

Joined: Thu Aug 09, 2007 4:44 pm
Posts: 67
Jeremy,

OK, that's fine. I have the performance working much better now with the other suggestions. I am using the default BDF font over the whole project now... are there BDF fonts that come in a larger pt size?


Top
 Profile  
 
 Post subject: Re: G55 slow +error
PostPosted: Tue Nov 22, 2011 3:23 pm 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
If you did a full install of Qlarity Foundry there is a folder in the install path (e.g. c:\program files\QSI Corporation\Qlarity Foundry\bdffonts) that contains a selection of BDF fonts. If those are not big enough, you can use ttf2bdf (http://www.beijerelectronicsinc.com/eng ... tf2bdf.exe) to convert a TrueType font to a BDF font (note: may require Cygwin to be installed) at any point size you desire.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 11 posts ] 

All times are UTC - 7 hours


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group