Board Logo
« Search Results »

Welcome Guest. Please Login or Register.
May 26th, 2017, 3:57pm


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ


Search Results

Total results: 10


 1   JB Programming Discussions / Re: Serial Port Communication  on: Today at 1:38pm
Started by EliG4 | Post by EliG4
Thank you. We're studying your reply. The device is a Kepco KLN 750 W power supply:

http://www.kepcopower.com/support/kln-series-1.70-r12.pdf


 
  Reply Quote Notify of replies

 2   Announcements / Liberty BASIC v4.5.1 now released!  on: Today at 1:07pm
Started by CarlGundel | Post by CarlGundel
The official release of Liberty BASIC v4.5.1 is now available! Download at http://www.libertybasic.com/lb451setup.exe

Here is the summarized list of changes for this release.

-Fixed a bug in the editor where the cursor would sometimes not clean
up after itself when typing some characters and then pressing the
arrow keys.

-Fixed a bug where trying to set fonts in the Liberty BASIC editor
would display an error if Windows has no default printer set.

-Added a new function idefilename$() which returns the full path of
the file currently under edit in the Liberty BASIC IDE.

-Updated the Liberty BASIC ini filename to lbasic451.ini

-Updated the welcome.bas program file.

-Updated the new4features.lsn file.

-Added a conversion of ASCII 160 to ASCII 32 when the Filter bad
characters option is turned on, in order to permit pasting of code
from some web sites.

-Added a new function idecode$() which returns the code in the
Liberty BASIC editor window. This is useful for creating utilities
such as code formatters or parsers that can be installed as external
programs under the Setup menu.

-Added source code coloring to the debugger code pane.

-Fixed a crash in the popup menu item for the debugger. Run to next
local line.

-Added display of global variables when debugging a sub or function.
A checkbox in the debugger turns this on/off.

-Added a Smaller font and Larger font button to the Liberty BASIC
editor toolbar so that you can change the font size quickly.

-Fixed the bug where the Liberty BASIC editor would open off-screen
when Liberty BASIC is started. This would give the appearance that
Liberty BASIC was not loading.

-Fixed the double-click behavior in the Liberty BASIC editor so that
variable names that have periods in them will be properly selected.
This improves the way that the new variable highlight works.

-Changed memory limit to 768MB because Windows sometimes choked on a
1GB allocation, and this sometimes prevents Liberty BASIC from
starting up.

-Updated runtime engine name to run451.exe

-Carl
 
  Reply Quote Notify of replies

 3   JB Programming Discussions / Re: Serial Port Communication  on: Today at 10:54am
Started by EliG4 | Post by Rod
If you simply ran that code of course it wouldn't work. You are not grasping the timing issues with the serial port.

First of the serial port can take several seconds to establish itself. But your transmissions will be queued and sent when the port is established, so your output appears to work.

In your input code you have read the empty buffer miles ahead of when it will actually be full of info.

You must send the query then wait to give the transmission and reception time to occur then read the input buffer.

Using the same code step through with the debugger, the ladybug icon, and wait each step for things to happen. You should get your input provided the query is formatted correctly.

One issue in the article is the ; character which prevents the additional CRLF pair being added to your print statements. It depends on EXACTLY what format your meter requires for query messages. Most require some sort of terminator to a message.

The 7 is the length of the expected message, yours looks 24 characters long but it is probably of variable length and will have a terminator character, what does the spec say?

Is there a web page for the device?
 
  Reply Quote Notify of replies

 4   JB Programming Discussions / Re: Serial Port Communication  on: Today at 09:38am
Started by EliG4 | Post by EliG4
Thank you very much for the reply. We tried the following code, taking our cue from your publication “Accessing the Serial Port”

open "com3:19200,n,8,1" for random as #Device
print #Device,"A007SOUR:VOLT 1.00"
print #Device,"A007FETC?"
dataRead$ = input$(#Device, 7)
print dataRead$
close #Device

We weren’t quite sure where the “7” came from in the “input$(#commHandle, 7)” example, so we scrolled 1 – 10. The “random” command worked the same as the “output” command. Still no reply from our power supply.

Using HyperTerminal, we do get a reply:
A007FETC?
1.00051E+00, 2.00513E+00


 
  Reply Quote Notify of replies

 5   JB Programming Discussions / Re: Serial Port Communication  on: Yesterday at 1:10pm
Started by EliG4 | Post by Rod
Open the port for RANDOM not OUTPUT. OUTPUT is one way, RANDOM is two way communication.

http://lbpe.wikispaces.com/AccessingSerialPort
 
  Reply Quote Notify of replies

 6   JB Programming Discussions / Serial Port Communication  on: Yesterday at 12:49pm
Started by EliG4 | Post by EliG4
We’re using JB for serial port control and communication with a programmable DC power supply. Sending code that controls the supply is no problem. For example, the following code establishes contact and sets the output voltage to 1 V:

open "com3:19200,n,8,1" for output as #Device
print #Device,"A007SYST:REM"
print #Device,"A007OUTP 1"
print #Device,"A007SOUR:VOLT 1.00"
close #Device

The power supply can also be queried to report its actual voltage and current state. We can control and receive info using HyperTerminal via COM3, but are struggling with getting info using JB. Please suggest a snippet that will receive and display info from the power supply. Thanks. EliG4

 
  Reply Quote Notify of replies

 7   Announcements / Re: Page addition to Just BASIC Wikispaces site  on: May 24th, 2017, 9:55pm
Started by thejoecole | Post by Facundo
Nice addition to the wiki !
 
  Reply Quote Notify of replies

 8   Announcements / Re: Page addition to Just BASIC Wikispaces site  on: May 23rd, 2017, 10:35pm
Started by thejoecole | Post by thejoecole
tooanalytical,
I tried to make sure the input only accepted numbers and not other characters for conversion. I'm considering the addition of Kelvin conversion for the next update... good call on ensuring the program does not accept input or go less than zero Kelvin. That's something I'll definitely keep in mind.
 
  Reply Quote Notify of replies

 9   Announcements / Re: Page addition to Just BASIC Wikispaces site  on: May 23rd, 2017, 10:23pm
Started by thejoecole | Post by tooanalytical
Temperature conversion is, as been said before, one of the finest of the simpler exercises for practicing writing a computer program. I had fun making two of these programs, GUI included. So much can be done with whatever you imagine with the choices we have in Just BASIC. A good piece of information to look for and handle is any user input which gives any value below absolute zero kelvin, in that such input data needs to be rejected. This is one way to make a better, reliable temperature converter program.
 
  Reply Quote Notify of replies

 10   General Board / Re: 2 windows code...  on: May 23rd, 2017, 2:08pm
Started by code | Post by tsh73
Really, it doesn't make sense to ask C questions on BASIC forum.
And JB cannot use Windows API.
 
  Reply Quote Notify of replies


Conforums Terms of Service | Membership Rules | Home | Search | Recent Posts | Notification | Format Your Message | Installation FAQ

Just BASIC wiki
Wikispaces

Donate $6.99 for 50,000 Ad-Free Pageviews!

| |

This forum powered for FREE by Conforums ©
Sign up for your own Free Message Board today!
Terms of Service | Privacy Policy | Conforums Support | Parental Controls