Beijer Electronics (formerly QSI Corporation)
http://www.qsiforums.com/

Buffering serial commands
http://www.qsiforums.com/viewtopic.php?f=6&t=4780
Page 1 of 1

Author:  Lazerhead [ Tue Mar 18, 2014 9:32 am ]
Post subject:  Buffering serial commands

Hello,

I'm working on a project that uses a G-72 terminal to communicate to a Galil DMC board. I have one case where I use the G-72 to reboot the Galil (for unexpected errors and other situations where a reboot of the Galil is needed). I have code to shutdown gracefully on the Galil, then we restart from the G-72. The problem is that it seems Qlarity buffers some of the communication to the Galil and sends it in batches. I need the shutdown code to execute for a second or two before we send the restart commands. I tried adding a delay just after the first code, but Qlarity still wants to buffer that command and send it with the restart. Is there a way to force Qlarity to send one command at a time?

Author:  Lazerhead [ Tue Mar 18, 2014 9:35 am ]
Post subject:  Buffering serial commands

Hello,

I'm working on a project that uses a G-72 terminal to communicate to a Galil DMC board. I have one case where I use the G-72 to reboot the Galil (for unexpected errors and other situations where a reboot of the Galil is needed). I have code to shutdown gracefully on the Galil, then we restart from the G-72. The problem is that it seems Qlarity buffers some of the communication to the Galil and sends it in batches. I need the shutdown code to execute for a second or two before we send the restart commands. I tried adding a delay just after the first code, but Qlarity still wants to buffer that command and send it with the restart. Is there a way to force Qlarity to send one command at a time?

Author:  Jeremy [ Tue Mar 25, 2014 6:19 am ]
Post subject:  Re: Buffering serial commands

Using the Galil communication object? No. It inherently communicates in batches. It would take a substantial rewrite to make it behave differently.

There are, perhaps ways you could suppress communication (for example if you have a free serial port changing it to use the free serial port). You could then add code to manually send a command to the Galil (see the Transmit API), wait a few seconds (normally using a TimerV2 rather than DelayMS if you don't want the terminal to appear locked up), then change the serial port on the Galil communication object back to the original one.

Page 1 of 1 All times are UTC - 7 hours
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/