Code Monkey home page Code Monkey logo

Comments (14)

AidenShaw2020 avatar AidenShaw2020 commented on May 21, 2024

I only add a comment.
Problem is appeared when I turn on talk mode on plotter, regardless on AR488 settings (++auto 1/0), and only for commands SP0;SP1;SP2;SP3;SP4;SP5;SP6; (pens change)

from ar488.

Twilight-Logic avatar Twilight-Logic commented on May 21, 2024

That is showing that a timeout occurred while sending which means it could not complete the three way handshake to send the character. That might have been caused by a change of state on the plotter or an intermittent wiring problem. I had a look at the manual to determine what the plotter does in TALK mode and I can see that OA is one of those commands sends a response to, in this case by sending its pen position. However the output above does not show the OA command being sent so it didn't get that far.

Incidentally, I notice an example in the 7475 Interfacing and Programming Manual for the Tektronix 4051 so I might just have to get one of these for my 4051 so that I can output some of the demo drawings! On the other hand there is an emulator program one can use on the PC which will take up less space....

from ar488.

AidenShaw2020 avatar AidenShaw2020 commented on May 21, 2024

OA command is not see, because i didnt send it in this example, but it is work OK (as other commands). Only thing with problem is SP commands, thats invoke communication freeze, when HP7475 is talker/listener mode.

from ar488.

ithinkido avatar ithinkido commented on May 21, 2024

@AidenShaw2020 are you sending the SP.. commands all together, or are you sending them singularly with a delay between each one? Can you send large files to the plotter without the timeout issue ? I have attached a larger test file.
Lorenz_attractor_A4.hpgl.txt

from ar488.

AidenShaw2020 avatar AidenShaw2020 commented on May 21, 2024

I created python script, that fill a buffer with plt data, send it to plotter, and wait for command is finished, then send next buffer.

Stuck for SP command is appear in both cases (with/without) delay.

from ar488.

ithinkido avatar ithinkido commented on May 21, 2024

What happens when you send the file without the script ? Buffer overflow ?

from ar488.

AidenShaw2020 avatar AidenShaw2020 commented on May 21, 2024

yes

from ar488.

Twilight-Logic avatar Twilight-Logic commented on May 21, 2024

Could I get a copy of your python script please?
I don't have a plotter, but I would like to test it to see how the interface responds.

The Arduino serial port has only a small 64 byte buffer. The firmware uses a 128 byte buffer, however if you are using a clone board with a CH340 serial IC, then there is no serial handshaking so you end up with buffer overflows unless you control the data flow. The genuine Arduino Uno/Nano boards with FTDI support do not have this problem.

The script probably needs to send the data in chunks of no more than 64 bytes with a suitable delay in between.

from ar488.

AidenShaw2020 avatar AidenShaw2020 commented on May 21, 2024

Script is ok, its same if i send only SP command manualy (with or without delay).

And also with external usb/ttl converter.

from ar488.

ithinkido avatar ithinkido commented on May 21, 2024

The Arduino serial port has only a small 64 byte buffer. The firmware uses a 128 byte buffer, however if you are using a clone board with a CH340 serial IC, then there is no serial handshaking so you end up with buffer overflows unless you control the data flow. The genuine Arduino Uno/Nano boards with FTDI support do not have this problem.

Sorry to hijack this issue, but the discussion here could answer a question I have had for a long time.
@Twilight-Logic Does the ATmaga32u4 version of this project handle serial handshake ?

from ar488.

Twilight-Logic avatar Twilight-Logic commented on May 21, 2024

I believe that 32u4 based MCUs using CSDC serial handle DTR/DSR, but I'm not sure about RTS/CTS. The CH340 does actually have these signals on its pins, but on clone boards they are not connected anywhere....

from ar488.

Twilight-Logic avatar Twilight-Logic commented on May 21, 2024

AidenShaw2020, could you let me know whether you are getting the same problem with the new version (0.51.03) please? There have been some significant changes, although this may be an issue of handshaking from the plotter side which the interface is not yet able to handle.

from ar488.

AidenShaw2020 avatar AidenShaw2020 commented on May 21, 2024

Hi Twilight-Logic, I confirmed, now its commands working properly.

from ar488.

Twilight-Logic avatar Twilight-Logic commented on May 21, 2024

That's good to know. Thank you.

from ar488.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.