Forum Index
HomeZBasic Home   Forum RulesForum Rules   Forum FAQForum FAQ   MemberlistMemberlist   UsergroupsUsergroups   RSS FeedRSS Feed
Site SearchSite Search   LinksLinks   DownloadDownload   Digests and SubscriptionsDigests and Subscriptions
ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in   RegisterRegister
BasicX to ZX-24 Conversion

 
Post new topic   Reply to topic    Forum Index -> ZX-24
Author Message
pdubinsky



Joined: 25 Nov 2005
Posts: 66
Location: South Carolina

Posted: 29 October 2008, 2:31 AM    Post subject: BasicX to ZX-24 Conversion Reply with quote

Howdy, Folks,

I have some old code that was written years ago for the Basicx-24 and it works fine on the BX-24. The software on the BX-24 makes requests on COM1 (8,N,1,19200) of a PIC16 and the PIC16 responds. Works fine on the BX-24 so I tried to run the same code on a ZX-24. It compiled with no errors but the app failed.

After some poking about, I found that the requests were not leaving the COM1 output buffer. I had been using a PutQueueStr command to feed the COM1 output buffer. I tried PutQueueByte and that failed also. The only commands that work are Debug.Print and Console.Write.

Am I missing something?

TIA,
Paul
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2493
Location: Portland, OR

Posted: 29 October 2008, 4:04 AM    Post subject: Re: BasicX to ZX-24 Conversion Reply with quote

pdubinsky wrote:
I had been using a PutQueueStr command to feed the COM1 output buffer. I tried PutQueueByte and that failed also.
It sounds like you are opening Com1, specifying new input and output queues. If so, you must close Com1 before you open it again. If you don't, the re-open will be ineffective and nothing that you add to the output queue will be sent.
Back to top
pdubinsky



Joined: 25 Nov 2005
Posts: 66
Location: South Carolina

Posted: 29 October 2008, 23:39 PM    Post subject: BasicX to ZX-24 Conversion Reply with quote

Thx, Don. That did it. Did I miss this in the manuals? (Or are my manuals out of date?)

Thx,
Paul
Back to top
dkinzer
Site Admin


Joined: 03 Sep 2005
Posts: 2493
Location: Portland, OR

Posted: 30 October 2008, 0:07 AM    Post subject: Re: BasicX to ZX-24 Conversion Reply with quote

pdubinsky wrote:
Did I miss this in the manuals? (Or are my manuals out of date?)
The caveat that a serial channel must be closed before being opened again has been in the documentation for OpenCom() for quite some time. However, due to an implementation error in the VM, that specification was not enforced until v2.6.0.

I have reviewed the behavior of BasicX in this regard and I have concluded that requiring the explicit call to CloseCom() in inadvisable. We have modified OpenCom() to automatically close a channel before proceeding with the open process. The documentation will also be updated to remove the caveat.

Even with this change, however, some care needs to be exercised when re-opening a serial channel if data had been previously sent. The call to re-open should be delayed until StatusCom() indicates that there is no data remaining to be sent.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Forum Index -> ZX-24 Time synchro. with the server - Timezone/DST with your computer
Page 1 of 1

 


All content Copyright © 2005-2012 Elba Corp. All Rights Reserved.
Opinions expressed in posts are those of the author and not necessarily those of Elba Corp.
Powered by phpBB © 2001, 2005 phpBB Group