LB Booster
« Serial com in LBB/LB4 - what is different? »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:25am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1 ... 1 2 3  Notify Send Topic Print
 veryhotthread  Author  Topic: Serial com in LBB/LB4 - what is different?  (Read 2280 times)
flotulopex
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 94
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #31 on: May 5th, 2014, 09:22am »

Quote:
...so why was the need to wait ten seconds not identified before you ported the code to LBB?

Sorry, I don't understand your question.

Or do you mean: why did Roger add ten seconds wait time in the LBB code since it worked in LB4 without that waiting period?

Did I say it worked in LB4 previously? To be honest, I didn't even try under LB4.... lipsrsealed
« Last Edit: May 5th, 2014, 09:28am by flotulopex » User IP Logged

Roger
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #32 on: May 5th, 2014, 10:07am »

on May 5th, 2014, 09:22am, flotulopex wrote:
Did I say it worked in LB4 previously? To be honest, I didn't even try under LB4.... lipsrsealed

I read your subject line "Serial com in LBB/LB4 - what is different?" as asking about differences between LBB and LB4. Was I wrong? Why did you mention LB4 at all if you didn't even try it?

Richard.
User IP Logged

flotulopex
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 94
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #33 on: May 5th, 2014, 1:47pm »

Subject should have been called: Serial com via LBB/LB4 or Terminal Software - what is different? But this is far too long....
User IP Logged

Roger
Rod
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 110
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #34 on: May 5th, 2014, 1:51pm »

If you are not used to serial comms the first lesson to learn is timing, buffers fill up, printers chunter and the PC flys along at a speed the port can't hope to follow.

http://lbpe.wikispaces.com/AccessingSerialPort
User IP Logged

flotulopex
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 94
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #35 on: May 5th, 2014, 3:52pm »

Thanks Rod,

This is exactly where I started.
User IP Logged

Roger
net2014
New Member
Image


member is offline

Avatar




PM


Posts: 37
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #36 on: May 5th, 2014, 6:36pm »

on May 5th, 2014, 1:51pm, Rod wrote:
If you are not used to serial comms the first lesson to learn is timing, buffers fill up, printers chunter and the PC flys along at a speed the port can't hope to follow.

http://lbpe.wikispaces.com/AccessingSerialPort


I have to admit my use of serial comms usually involves some fudge of timing to make things work, but in reality shouldn't timing be irrelevant? That's why handshake lines are part of rs232 specification. These lines seem to be disabled in LB4 serial open command. Isn't LB4/LBB able to handle handshaking? If it is capable then perhaps we should put some effort into proper handshake investigation.
User IP Logged

Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #37 on: May 5th, 2014, 8:29pm »

on May 5th, 2014, 6:36pm, net2014 wrote:
I have to admit my use of serial comms usually involves some fudge of timing to make things work, but in reality shouldn't timing be irrelevant?

It's honest of you to admit it, but as you say it shouldn't be necessary.

Quote:
That's why handshake lines are part of rs232 specification.

Not really. You commonly don't need any explicit handshaking or timing fudges.

For example if the communication protocol involves data packets alternately flowing in one direction and then the other (poll-data-poll-data or data-response-data-response) then the only requirement is that the receive buffer is big enough to hold an entire packet.

Even if the communication is one-way you still don't need any handshaking if these conditions are met:
  1. The average rate at which the receiving end can accept and process data exceeds the average transmission rate.
  2. There is a receive buffer of sufficient length that it can cope with the worst case fluctuation of transmit rate and receive processing capability.
With typical baud rates and processing speeds these conditions can often be easily met.

Since the majority of applications match one or other of these cases, handshaking is rarely necessary. That is fortunate given that many communication paths do not support the additional data channels that are necessary for hardware handshaking.

Quote:
Isn't LB4/LBB able to handle handshaking? If it is capable then perhaps we should put some effort into proper handshake investigation.

Of course they can handle handshaking, but I don't really agree that much investigation is desirable given how unusual it is for it to be needed.

Richard.
User IP Logged

flotulopex
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 94
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #38 on: May 6th, 2014, 1:11pm »

This was my question to the printer's support service:
Quote:
Hello,
I'm trying to send G-code commands to my Witbox via my PC.
It works via HyperTerminal but it will not work with other programming languages I use and I can't find what is wrong.
May I kindly ask you to give me the serial data protocol you use (baud, parity, data ,stop, flow control and so on)?
Is there any CRC or special controlling character used?
Thank you for your help.
Roger


...here's the answer I got:
Quote:
Dear Roger,
In Witbox, it is baud to 115200. You may know serial port to comunnicate with it.
You may use PuTTy, it is software for comunnicate with Witbox.
We remain at your disposal for any questions
Saludos,

undecided
User IP Logged

Roger
Rod
Full Member
ImageImageImage


member is offline

Avatar




PM

Gender: Male
Posts: 110
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #39 on: May 9th, 2014, 5:44pm »

Having browsed a bit deeper I see that we are asking the wrong questions. The serial link is the serial link and it works and isn't the problem.

The Witbox uses an open source electronics board to drive its stepper motors and extruder. Ramps 1.4. This is an Arduino based microprocessor board that manages all aspects of 3d printing. It is used in a variety of modern 3d printers.

So if you want to take control of the printer you need to research Ramps 1.4

Will this be easy? Well it's kinda like asking me to take my All in One printer scanner, take control of the scanner, move it to 100,100 and scan the next three pixels. Easy? No way.

But I have not researched Ramps 1.4 protocol, that's where you need to spend the time.

Witbox clearly focus on the hardware, which they appear to be superb at. But they have opted for the open source driver software, so you will get bland responses if you query comms when the real focus should be Ramps.
User IP Logged

flotulopex
Junior Member
ImageImage


member is offline

Avatar




Homepage PM

Gender: Male
Posts: 94
xx Re: Serial com in LBB/LB4 - what is different?
« Reply #40 on: May 12th, 2014, 12:19pm »

Thanks Rod,

That's effectively THE board (Ramp)!

As you say, the problem is (was) not either on a serial comm level nor on LBB's side, but one has to start somewhere one time and the info I got back in this forum helped me to find the solution, even the one I didn't expect.
User IP Logged

Roger
Pages: 1 ... 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