BBC BASIC for Windows
« COM Lighting Control. »

Welcome Guest. Please Login or Register.
Apr 5th, 2018, 11:56pm



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

If you require a dump of the post on your message board, please come to the support board and request it.


Thank you Conforums members.

BBC BASIC for Windows Resources
Online BBC BASIC for Windows documentation
BBC BASIC for Windows Beginners' Tutorial
BBC BASIC Home Page
BBC BASIC on Rosetta Code
BBC BASIC discussion group
BBC BASIC for Windows Programmers' Reference

« Previous Topic | Next Topic »
Pages: 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: COM Lighting Control.  (Read 616 times)
admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: COM Lighting Control.
« Reply #26 on: Aug 29th, 2010, 9:26pm »

on Aug 29th, 2010, 6:01pm, thefamouscash wrote:
Code:
SYS `FT_GetNumberOfDevices`, ^DeviceCount%, "", FT_LIST_NUMBER_ONLY TO FT_Status% 
produces the message but everything is set.

Clearly everything is not set! It really ought to be easy to discover which of the variables is causing the 'No such variable' error, either by printing each one out, or using the List Variables utility. One or other of these variables must definitely not be defined if you are receiving that error:

`FT_GetNumberOfDevices`
FT_LIST_NUMBER_ONLY

When the error occurs, open the List Variables window and scroll down looking for those two variables. I bet one of them isn't there!

Whilst of course I sympathise with your plight, if you're really at the stage of not being able to discover the cause of a 'No such variable' error I would suggest that you're too inexperienced at programming in BBC BASIC to tackle the task you have set yourself.

My previous offer remains. If you're prepared to lend me the device you are trying to control I will write the code to drive it.

Richard.
« Last Edit: Aug 29th, 2010, 9:33pm by admin » User IP Logged

admin
Administrator
ImageImageImageImageImage


member is offline

Avatar




PM


Posts: 1145
xx Re: COM Lighting Control.
« Reply #27 on: Aug 31st, 2010, 10:24pm »

on Aug 29th, 2010, 9:26pm, Richard Russell wrote:
One or other of these variables must definitely not be defined if you are receiving that error:

`FT_GetNumberOfDevices`
FT_LIST_NUMBER_ONLY

Surprisingly, it turns out that the OP's difficulty stemmed from not distinguishing between the apostrophe character ' (which some people call single quote) and the grave accent character ` (which some people call a backtick or backquote):

http://en.wikipedia.org/wiki/Grave_accent

In BBC BASIC the apostrophe (CHR$39) is used in the INPUT and PRINT statements to signify that output should move onto the next line. The grave accent (CHR$96) is a valid character within (and at the beginning of) a variable name. Thus in BBC BASIC this is valid code:

Code:
  `variable` = 12345
  PRINT ' `variable` 

Richard.
User IP Logged

thefamouscash
New Member
Image


member is offline

Avatar




PM


Posts: 17
xx Re: COM Lighting Control.
« Reply #28 on: Sep 1st, 2010, 12:03am »

Thank you for the information.
I stand corrected. I should have taken the time to attend to your clear instruction about CHR$ 96 instead of assuming it was the single quiote. I confess I was unaware of the usage of that character as part of the variable.
Still working on the program but, at least, now have a chance to make it work.
Regards,
Bob.
User IP Logged

John Fisher
Guest
xx Re: COM Lighting Control.
« Reply #29 on: Sep 7th, 2010, 09:34am »

Have you managed to get this working? I'd have thought that you could use the serial examples in the BB4W manual more easily than the dll method. Did you install the Audon driver? Does a new COM port then appear in your Control Panel -> System -> Hardware -> Device manager? Can you communicate with Hyperterminal and send/receive command/response strings with 9600/8n1 protocol?
User IP Logged

thefamouscash
New Member
Image


member is offline

Avatar




PM


Posts: 17
xx Re: COM Lighting Control.
« Reply #30 on: Sep 7th, 2010, 5:08pm »

When unit was purchased, drivers downloaded automatically. Unit "clicks" when Audon's software form (like hyperterminal?) is used and box lights according to which of the eight relays are on. Ititally, in addition to COMS 1 and 2, a COM3 appeared. Since I have been endlessly experimenting, this now shows as COM 5. (No idea why). I believe Vista did away with Hyperterminal.
User IP Logged

Pages: 1 2 3  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls