Sharing my disadventures #2
well-it-wasnt-me
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Lately i had to play again with the SAS Protocol. The original script (the one from thomas-pythonas) contains the most basic functions to interact with the machine and have what you need to start.
My disadventure started with Raspberry. So, if you plan to use a pi...read carefully...
Raspberry Hardware Limitation
As per SAS documentation, for the connection, you need:
I won't go into detail on why the raspberry will never work with this settings BUT i'm gonna share a link that you can read whenever you want that explains WHY. HERE for the explaination.
Solution
An effing usb rs232 cable.....i used this one.
As soon as i used this cable i started having "normal" responses and no more badcrc errors.
Good to know
Event Reporting
Basically you have 2 ways: Standard event poll and real time event poll.
The standard event poll works with a FIFO memory and in real world use cases is kinda useless (unless you need to store the history of this machine status). You can call this event simply using the
event_poll
method in the code.When you start the real time event reporting the machine, no matter what you ask, will always reply with the current event in the machine...leading to badcrc error and whatnot...plus the real time event responses are not mapped in the code (don't worry...im working on it). The function, in the code, to abilitate this is
en_dis_rt_event_reporting
.Of course i needed the real time event reporting (to bind some actions) and at same time use some of the
AFT_*
functions in the code.To solve this issues i had to use the operator page on the machine to abilitate a second channel and buy a second prolific usb rs232 cable....
In this way on a channel i abilitate the real time event reporting and on the second channel i could use the script normally (and the AFT functions) without problems.....
Of course...this is a way created out of "no time"....if somebody has a better idea im all ear !
Beta Was this translation helpful? Give feedback.
All reactions