Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Fri Nov 24, 2017 6:12 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Tue Oct 14, 2008 7:11 am 
Offline

Joined: Thu Jan 11, 2007 1:21 am
Posts: 11
I want my G55 to initiate communication with another device that may or may not be running at a non standard baud rate (10400 buad).
It will then issue a command that will make it switch back to 19200 baud, but before I can do that I want to know if it is possible to set the serial port up to run at a non standard baud rate.

Obviously just changing the baud rate value to an integer (e.g. SetSystemSetting(SYS_COM1BAUD, 10400, SYSACT_DONOW)) does not want to compile because it is not one of the enumerated types.

Any help/news/info?

Regards

_________________
Rudolph van Niekerk

\o

@\ Fight Gravity

< \ Climb


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 7:21 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
Well, the statement "SetSystemSetting(SYS_COM1BAUD, 10400, SYSACT_DONOW)" should compile just fine -- I use integer literals for the middle parameter on that call all the time.

It will, however, throw a runtime exception as you cannot set custom baud rates on a Qlarity terminal. The primary reason for this is that the baud rates are determined as a divisor from a clock that times the serial line. While we have carefully selected the clock rate and divisors for the standard baud rates, for other ones there is often no good divisor to match the requested baud. I do not have the tables handy, but there is a good chance that the nearest available baud rate, based on an integer divisor would actually be 9600 -- which would probably not meet your needs.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 7:33 am 
Offline

Joined: Thu Jan 11, 2007 1:21 am
Posts: 11
Thanks for the (awesomely quick) response

I understand that, yes. And I'm also sure 9600 wont work.

Is there no way that I can maybe get hold of the table values, or even change or re-define the enumeration somewhere?

I've pretty much always been able to set the divisor in my embedded projects to match a relative low baud rate like 10400. It's usually only at the top (e.g. 115200) that the divisor value drops to a single digit value.

_________________
Rudolph van Niekerk

\o

@\ Fight Gravity

< \ Climb


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 7:44 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
I will mention your request to the firmware team, and see what their thoughts are.

As far as changing the enumerations -- that wouldn't do a lot of good. The enumeration is not defined as a divisor, rather is literally the baud you are trying to represent. For instance the enumerated item BAUD_9600 is literally the integer value 9600 (either of which can be passed to SetSystemSettings). The translation to divisor is handled deeper in the firmware and is totally opaque to Qlarity. What this means, is that there is no way for a Qlarity application to directly manipulate the divisor used. One problem with allowing this is that the end result would not be portable between our Qlarity terminals -- which may use different divisors. Occasionally even within a particular terminal model we may modify the hardware in such a way that using a specific divisor may no longer work -- this is why the BAUD_xxx enumerations are symbolic values that are later translated by the firmware.

Again, I will run this by the firmware team and see if they have any thoughts, but I don't think what you are asking is possible right now.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Tue Oct 14, 2008 8:42 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
I talked to the firmware team. Unfortunately the structure of the code is such that there is no easy way to allow a Qlarity application to select a custom baud rate or divisor.

I don't know enough about your application to make much more of a comment. However you might want to contact your sales representative to discuss if a custom firmware modification might be appropriate for your needs and volume levels.

I am sorry that I could not be of more help in this matter.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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