Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Wed Nov 22, 2017 7:29 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Start/Stop indication
PostPosted: Mon May 08, 2006 4:42 pm 
Offline

Joined: Thu Apr 13, 2006 3:17 pm
Posts: 41
Location: Milpits, CA
Hi :



Is there a similar faiclity as the Startup, for when the unit is turned off?



I am thinking about connecting the G55 via RS232 to a remote PC acting as the server. I wonder if there is a way to automatically detect on the PC server side when the pendant is turned on and turned off. On Startup, I can send a hello string. Can a 'goodbye' string be sent when the unit is tuned off?



Thanks,

Ata

_________________
Semiconductor EFEM products


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 6:45 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
I guess it depends on what you mean.



If you mean when the unit is put to sleep, yes that is possible. Pushing the "power" button (an unfortunate name) on the keypad will put the unit to sleep. It is still on and when "power" is pushed again it will wake up. When the unit is about to go to sleep, it executes a MSG_SLEEP which can be handled in global code to do what you want.

Code:

func Sleep ()

    handles MSG_SLEEP



    'Inform the host we are going to go to sleep for a while.  Note the

    'TRUE for the block parameter of Transmit (ensures the transmit

    'completes before the unit goes to sleep)

    Transmit (COM1, "Night Night\n", true)

    return

endfunc



func Wake ()

    handles MSG_WAKE



    'Inform the host that we have reawaked and are ready to go

    Transmit (COM1, "Ready to Roll!!!\n", false)

    return

endfunc





Now if you are asking if the G55 can inform the host before it loses power, the answer is no -- it will shut off immediately. If you are trying to hande this case, we usually use a form of heartbeat. Normally I would add a timer similar to this one
Code:

init parent := default

init timertype := _tt_periodic

init timeunits := _tt_milliseconds

init timeperiod := 1000

init enabled := true



func timeout()

    Transmit (COM1, "Still Tickin'\n", true)

endfunc



The host would expect these messages and if an extended interval occurred with no "Still Tickin'" message, it would assume that the G55 was offline.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
 Post subject:
PostPosted: Tue May 09, 2006 4:52 pm 
Offline

Joined: Thu Apr 13, 2006 3:17 pm
Posts: 41
Location: Milpits, CA
Hi Jerry,



Thanks for your reply.



The G55 handleld hardware has not arrived, so please confirm for me that if pushing the "power" a second time just puts it to sleep and not turn it off, how does one turn off power to the unit? Is there an ON/OFF button?



I looked for the two messages MSG_SLEEP and MSG_WAKE and could not find them in the Programmer's Manual (Chapter 3: Messages and Message Handler Prototypes). Are they documented elsewhere?

Do I put these two message handlers in the global section?



At any rate, I like the watchdog timer idea.



Thanks,

Ata

_________________
Semiconductor EFEM products


Top
 Profile  
 
 Post subject:
PostPosted: Wed May 10, 2006 7:05 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
The G55 does not have a true power button. To completely turn off a G55 you must remove power. The G55 does have a sleep button (which is unfortunately labeled 'power') which puts the unit into a low power sleep mode. Pressing the button again wakes the unit up.



MSG_SLEEP and MSG_WAKE are very new. In fact so new, that it appears that the current release of Qlarity Foundry does not include them. (I didn't realize this yesterday when I replied to your message).



If you want to use those messages, you would need to use the current Beta version of Qlarity Foundry. The current firmware release does have support for those messages. The best place to put these handlers would be in the global section.

_________________
Jeremy
http://www.beijerinc.com


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