Beijer Electronics (formerly QSI Corporation)

Manufacturer of Mobile Data and Human Machine Interface Terminals.
It is currently Sat Nov 18, 2017 5:22 am

All times are UTC - 7 hours




Post new topic Reply to topic  [ 11 posts ] 
Author Message
 Post subject: Serial communication 232
PostPosted: Mon Jun 20, 2011 3:50 am 
Offline

Joined: Wed Jun 15, 2011 12:14 am
Posts: 28
Good morning, I am communicating with rs232 serial my terminal G72 with other pc card and sometimes the terminal is blocked. I supposed that the terminal is waiting for data or information and during the communication may there is an error or problem.

I want to know if there is a way to unblocked the terminal. Can I control the communication and if there is a problem pass it without errors. I am looking for not blocking the terminal in this situation.

Any solution ?? Please give me a hand.
Thanks a lot


Top
 Profile  
 
PostPosted: Mon Jun 20, 2011 6:41 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
I am not really sure what you mean by "blocked". What it may be is that one of the RS232 communication devices (either the G72 or the PC card) may be attempting to use hardware handshaking of some sort and the other is not.

Unfortunately I am not familiar with your PC card, so I can only speculate as to its abilities and requirements. Here are some possible resolutions (assuming I guess right in my description)

  • Set both sides to use no flow control. As nearly every modern device is capable of receiving data at full serial speeds, there is not a lot of need for serial flow control these days. Disabling it will ensure that neither device waits unnecessarily
  • If the PC card requires RTS/CTS flow control, try setting the G72 to use RTS/CTS flow control as well.
  • Alternatively to the last suggestion, set the G72 to use no flow control. Use the SetCTS API to manually set the flow control line to the required state
  • If the PC card requires DTR/DSR flow control, you may need to create a special serial cable or adapter. The G72 does not use the DTR/DSR flow lines. In this case you will want to wire the G72 so that the CTS line drives both CTS and the appropriate DTR or DSR line. You might want to directly contact our support if you need more details on this option.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Mon Jun 20, 2011 9:52 am 
Offline

Joined: Wed Jun 15, 2011 12:14 am
Posts: 28
What I try to say is that the terminal sometimes during the communication jams (freezes up) and doesn't work. And the only way is disconnect it and turn on again.

I search a solution to this problem and not have to turn it off.


Top
 Profile  
 
PostPosted: Mon Jun 20, 2011 10:00 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 several possible interpretations to "jams" Of necessity I am going to have to dive a bit technical here.

I would like to ask this in terms of a "Blocking Send", which in Qlarity can be achieved via Transmit(COM1, "Data", true). The true causes Qlarity to block until the data has been pushed out the serial port. Normally you would use a non-blocking send in Qlarity. In that case the symptoms might be similar, but more difficult to diagnose.

Do you mean that:
  • When the G72 executes a blocking send, it hangs forever on that line of code?
  • When the G72 executes a blocking send, it hangs for several seconds (10-15) at which point Qlarity continues, but the data is never sent?
  • When the PC card executes a blocking send it hangs forever and the data is never sent?

My guess is still flow control issues. Are you able to fully disable flow control on both sides? Does that have any affect on the problem?

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Mon Jun 20, 2011 11:19 pm 
Offline

Joined: Wed Jun 15, 2011 12:14 am
Posts: 28
It is so strange and difficult to describe because when I am simulating with qlarity software and my DSP card (ezdsp f28335) the serial communication is right and data is sending and receiving successfully.
But when I am trying the communication between the DSP card and the terminal no works well and the terminal sometimes hangs forever and doesn't respond (jams).

All setting parameters (flow control, baud rate, ports... ) are the same. I not sure what is the problem.
Do you know if there is a command or code function to reset the terminal in that case ??
Or to check it ??

Thanks.


Top
 Profile  
 
PostPosted: Tue Jun 21, 2011 6:36 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
I tried to dig up the docs on that card, with limited success.

If you are using P12, RS-232 Connector to connect with the G72, it looks like you would need a null modem adapter. You should also be using no flow control as it appears that the ezdsp f28335 does not use any flow control lines.

_________________
Jeremy
http://www.beijerinc.com


Top
 Profile  
 
PostPosted: Tue Jun 21, 2011 6:58 am 
Offline

Joined: Wed Jun 15, 2011 12:14 am
Posts: 28
A null modem adapter?? Could you recommend me one ?
I am using NO FLOW CONTROL all the time, I have this part correctly configurated.


Top
 Profile  
 
PostPosted: Tue Jun 21, 2011 7:03 am 
Offline

Joined: Wed Jun 15, 2011 12:14 am
Posts: 28
I am checking my configuration and I have a null modem adpater !!!
But may I am connecting wrong.

I am connecting the null modem adapter at the DSP CARD and the other wire's side (withouth null modem adapter) to the terminal G72. Is this ok? Or How I have to connect this ??


Top
 Profile  
 
PostPosted: Tue Jun 21, 2011 8:05 am 
Offline
User avatar

Joined: Thu Mar 02, 2006 2:12 pm
Posts: 487
Location: Salt Lake City, Utah
This could also be a performance issue where the processing of the incoming data is taking a long time causing the unit to appear locked up. This FAQ describes some ways this can happen.
viewtopic.php?f=4&t=164

Could you send me a copy of the source code of your application so I can see if there is something there that could be causing a problem?

_________________
Ron L.

http://www.beijerelectronicsinc.com/


Top
 Profile  
 
PostPosted: Tue Jun 21, 2011 9:03 am 
Offline

Joined: Wed Jun 15, 2011 12:14 am
Posts: 28
I could send you the code... but I prefer sending to your personal email to posting in the forum. My application is designed by a private company and I could not publicate it. It is so private.
I lelf you my personal email, please contact with me.

roberto@torytrans.com


Top
 Profile  
 
PostPosted: Tue Jun 21, 2011 9:06 am 
Offline
QSI Support
QSI Support
User avatar

Joined: Wed Mar 08, 2006 12:25 pm
Posts: 881
Location: Salt Lake City, Utah
If you want to send an email to Ron (and he was suggesting you send him a personal message, not post your code), click on the link next to his name. That will take you to a screen that has a link titled "Email Ron L". Click that link and you should be able to send him an email message.

_________________
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