Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sun Nov 19, 2017 1:41 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 5 posts ] 
Author Message
PostPosted: Mon Nov 12, 2007 10:06 am 
Offline
User avatar

Joined: Sat Aug 12, 2006 6:33 pm
Posts: 57
Location: Richmond, VA
In my code for a QTERM G55, there is some one-time initialization that calls SetSystemSetting() for many different things. When I run this code in Qlarity Foundry, QF lock up. My only recourse is to force the QF to quit with the Task Manager. Is this expected behavior? If not, what could I be doing wrong?



Here's the code:



inConfiguration=GetHardwareInfo(HW_COMLIST)

if(Len(inConfiguration)>=1) then

if(inConfiguration[0]<>1) then

return false

endif

endif



SetSystemSetting(SYS_COM1BAUD,BAUD_115200,SYSACT_ALWAYS)

SetSystemSetting(SYS_COM1DATABITS,DATABITS_8,SYSACT_ALWAYS)

SetSystemSetting(SYS_COM1PARITY,PARITY_NONE,SYSACT_ALWAYS)

SetSystemSetting(SYS_COM1STOPBITS,STOPBITS_1,SYSACT_ALWAYS)

SetSystemSetting(SYS_COM1FLOWCONTROL,FLOWCONTROL_RTS_CTS,SYSACT_ALWAYS)

SetSystemSetting(SYS_COM1FLOWTIMEOUT,0,SYSACT_ALWAYS)

SetSystemSetting(SYS_AUTOSHIFT,false,SYSACT_ALWAYS)

SetSystemSetting(SYS_AUTOPOWER,POWERKEY_NORMALKEY,SYSACT_ALWAYS)

SetSystemSetting(SYS_FEEDBACK_TYPE,FBTYPE_VIDEO,SYSACT_ALWAYS)

SetSystemSetting(SYS_PASSWORD,password,SYSACT_ALWAYS)

' SetSystemSetting(SYS_CONTRAST,114,SYSACT_ALWAYS)

SetSystemSetting(SYS_BACKLIGHT,255,SYSACT_ALWAYS)

SetSystemSetting(SYS_VOLUME,255,SYSACT_ALWAYS)

SetSystemSetting(SYS_ORIENT,ORIENT_LANDSCAPE,SYSACT_ALWAYS)

SetSystemSetting(SYS_KEYRPTDELAY,520,SYSACT_ALWAYS)

SetSystemSetting(SYS_KEYRPTPERIOD,120,SYSACT_ALWAYS)

SetSystemSetting(SYS_KEYCLICK,true,SYSACT_ALWAYS)

SetSystemSetting(SYS_KEYRPT,true,SYSACT_ALWAYS)

SetSystemSetting(SYS_USEDRAWCACHE,CACHE_EFFECTIVE_ENABLED,SYSACT_ALWAYS)

SetSystemSetting(SYS_SAVE,false,SYSACT_ALWAYS)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Nov 12, 2007 1:17 pm 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
I would start by putting a breakpoint (F9) on a line of code you suspicious of in Qlarity Foundry and using the debugger to step through each line to see where the lock up is caused.

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 13, 2007 7:49 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
In no case should this cause QF to hard lock up. The code you showed is valid. While not all of those commands are properly simulated in Qlarity Foundry, QF should ignore those that it doesn't support. Not lock up.



I agree with Ron, stick a breakpoint and see what is happening. Might not be a bad idea to try this yourself Ron. If you can't, I will do it when I get back to the office.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 13, 2007 8:35 am 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
It looks like the code:

Code:
SetSystemSetting(SYS_COM1FLOWTIMEOUT,0,SYSACT_ALWAYS)


was causing the lock-up in Qlarity Foundry.



You can change the code to:

Code:
#IFNOT _TOOL_ANY

    SetSystemSetting(SYS_COM1FLOWTIMEOUT,0,SYSACT_ALWAYS)

    #ENDIF


which will prevent execution in Qlarity Foundry, until we are able to fix that. I tested this on a Qlarity G55, and did not have any problems.

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 13, 2007 8:38 am 
Offline
User avatar

Joined: Sat Aug 12, 2006 6:33 pm
Posts: 57
Location: Richmond, VA
Ah, you beat me to it. I was just going write that



SetSystemSetting(SYS_COM1FLOWTIMEOUT,0,SYSACT_ALWAYS)



is what is causing there error.





Thanks for the work-around.


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