shaft | An SSH tunnel assistant for the command line | Command Line Interface library
kandi X-RAY | shaft Summary
kandi X-RAY | shaft Summary
An SSH tunnel assistant for the command line.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of shaft
shaft Key Features
shaft Examples and Code Snippets
Community Discussions
Trending Discussions on shaft
QUESTION
I have a CSV file like this one:
...ANSWER
Answered 2021-Feb-01 at 08:47Use this code for it to work :
QUESTION
Overview:
I spent a while trying to think of how to formulate this question. To narrow the scope, I wanted to provide my initial HW requirements in the form of a ‘real life’ example application.
I understand that clock speed is probably relative, in the sense that it is a case by case basis. For example, your requirement for a certain speed may be impacted on by the on-chip peripherals offered by the MCU. As an example, you may spend (n) cycles servicing an ISR for an encoder, or, you could pick an MCU that has a QEI input to do it for you (to some degree), which in turn, may loosen your requirement?
I am not an expert, and am very much still learning, so please call me out if I use an incorrect term, or completely misinterpret something. I assure you; the feedback is welcome!
Example Application:
This application is relatively simple. It can be thought of as a non-blocking state machine, where each ‘iteration’ of the machine must complete within 20ms. A single iteration of this machine has 4 main tasks:
- Decode a serial payload, consisting of 32 bytes. The length is fixed at 32 bytes, payload is dynamic, baud is 115200bps (See Task #2 below)
- Read 4 incremental shaft encoder signals, which are coupled with 4 DC Motors, 1 encoder for each motor (See Task #1 Below)
- Determine the position of 4 limit switches. ISR driven, trigger on rising edge for each switch.
- Based on the 3 categories of inputs above, the MCU will output 4 separate PWM signals @ 50Hz (20ms) to a motor controller for its next set of movements. (See Task #3 below)
From an IO perspective, I know that the MCU is on the hook for reading 8 digital signals (4 quadrature encoders, 4 limit switches), and decoding a serial frame of 32 bytes over UART.
Based on that data, the MCU will output 4 independent PWM signals, with a pulse width of [1000usec -3200usec], per motor, to the motor controller.
The Question:
After all is said and done, I am trying to think through how I can map my requirements into MCU selection, solely from a speed point of view.
It’s easy for me to look through the datasheet and say, this chip meets my requirements because it has (n) UARTS, (n) ISR input pins, (n) PWM outputs etc. But my projects are so small that I always assume the processor is ‘fast enough’. Aside from my immediate peripheral needs, I never really look into the actual MCU speed, which is an issue on my end.
To resolve that, I am trying to understand what goes into selecting a particular clock speed, based on the needs of a given application. Or, another way to say it, which is probably wrong, but how to you quantify the theoretical load on the processor for that specific application?
Additional Information
Task #1: Encoder:
Each of the 4 motors have different tasks within the system, but regardless, they are the same brand/model motor, and have a maximum RPM of 230. My assumption is, if at its worst case, one of the motors is spinning at 230 RPM, that would mean, at full quadrature resolution (count rising/falling for channel A/B) the 1000PPR encoder would generate 4K interrupts per revolution. As such, the MCU would have to service those interrupts, potentially creating a bottleneck for the system. For example, if (n) number of clock cycles are required to service the ISR, and for 1 revolution of 1 motor, we expect 4K interrupts, that would be … 230(RPM) * 4K (ISR per rev) == 920,000 interrupts per minute? Yikes! And then I guess you could just extrapolate and say, again, at it’s worst case, where each of the 4 motors are spinning at 230 RPM, there’s a potential that, if the encoders are full resolution, the system would have to endure 920K interrupts per minute for each encoder. So 920K * 4 motors == 3,680,000 interrupts per minute? I am 100% sure I am doing something wrong, so please, feel free to set me straight.
Task #2: Serial Decoding
The MCU will require a dedicated HW serial port to decode a packet of 32 bytes, which repeats, with different values, every 7ms. Baud rate will be set to 115200bps.
Task #3: PWM Output
Based on the information from tasks 1 and 2, the MCU will write to 4 separate PWM outputs. The pulse for each output will be between 1000-3200usec with a frequency of 50Hz.
...ANSWER
Answered 2021-Mar-30 at 07:09You need to separate real-time critical parts from the rest of the application. For example, the actual reception of an UART frame is somewhat time-critical if you do so interrupt-based. But the protocol decoding is not critical at all unless you are expected to respond within a certain time.
Decode a serial payload, consisting of 32 bytes.
You can either do this the old school way with interrupts filling up a buffer, or you could look for a part with DMA, which is fairly common nowadays. DMA means that you won't have to consider some annoying, relatively low frequency UART interrupt disrupting other tasks.
Read 4 incremental shaft encoder signals
I haven't worked with such encoders so I can't tell how time-critical they are. If you have to catch every single interrupt and your calculations are correct, then 3,680,000 interrupts per minute is still not that bad. 60*60/3680000 = 978us. So roughly one interrupt every millisecond, that's not a "hard real-time" requirement. If that's the only time-critical thing you need to do, then any shabby 8-bitter running at 8MHz could keep up.
Determine the position of 4 limit switches
You don't mention timing here but I assume this is something that could be polled cyclically by a low priority cyclic timer.
the MCU will output 4 separate PWM signals
Not a problem, just pick one with a decent PWM hardware peripheral. You should just need to update some PWM duty cycle registers now and then.
Overall, this doesn't sound all that real-time critical. I've done much worse real-time projects with icky 8 and 16 bitters. However, each time I did, I always regret not picking a faster MCU, because you always come up with stuff to add as the project/product goes on.
It sounds like your average mainstream Cortex M0+ would be a good candidate for this project. Clock it at ~48MHz and you'll have plenty of CPU power. Cortex M4 or larger if you actually expect floating point math (I don't quite see why you'd need that though).
Given the current component crisis, be careful with which brand you pick though! In particular stay clear of STM32, since ST can't produce them right now and you might end up waiting over a year until you get parts.
QUESTION
I have a list of parts that have a part code. I need to align columns B-E to match the list of numbers in column A, leaving blanks where the data has moved down. The number in column B should match the number in column A.
A simple sort will not do because ColumnB,D,E has fewer entries than ColumnA and some numbers in ColumnB are not in ColumnA.
A B C D E '005023 5025 oil-filler-level-plug-genuine-005025 GENUINE PIAGGIO, OIL FILLER PLUG. 1.5 '005024 5027 rear-hub-cone-shim-lambretta-005027 LAMBRETTA REAR HUB CONE SHIM. 1.25 '005025 5031 piston-s2-s3-524mm-125cc-gol-005031 ITALIAN MADE BY GOL 46.5 '005027 5032 exhaust-simonini-px-125-black-005032 135 '005029 5036 floor-runner-kit-vespa-px-125-200-005036 GOOD QUALITY, ITALIAN MADE, COMLETE FLOOR RUNNER KIT 25 '005031 5037 rear-light-grey-top-for-vespa-rally-005037 5 '005032 5038 front-hub-back-plate-chrome-005038 Suitable for all Lambretta S1 S2 S3 models 45 '005033 5041 clutch-plates-surflex-cosa-vespa-px-005041 TOP QUALITY ITALIAN COSA CLUTCH PLATES MADE BY SURFLEX. 16 '005036 5044 points-ducati-style-lambretta-005044 TOP QUALITY,CONTACT BREAKER POINT FOR LAMBRETTA 10 '005037 5045 condensor-ducati-dansi-li-sx-tv-gp-005045 DUCATI TYPE CONDENSOR FOR MOST LAMBRETTAS. 9 '005038 5047 panel-handle-lock-mechanisms-s1-s2-005047 TOP QUALITY, LAMBRETTA SERIES 1 & 2 SIDE PANEL HANDLE MECHANISM KIT. 41 '005040 5049 fork-push-rods-pistons-s1-2-3-005049 TOP QUALITY LAMBRETTA FORK PUSH ROD PISTON SET. 12 '005041 5050 fuel-tank-vespa-gs-160-180ss-rally-005050 100 '005044 5051 wheel-rim-chrome-10-inch-vespa-005051 TOP QUALITY, CHROMED WHEEL RIMS ( 1 X WHEEL ) 38 '005045 5052 carb-box-top-carbon-look-pe-px-efl-005052 VBB SPRINT GT PX 22 '005047 5054 input-shaft-needle-rollers-px-21-005054 ITALIAN MADE SET OF 23 INPUT SHAFT NEEDLE ROLLER BEARINGS 5 '005049 5055 air-hose-clips-19mm-series-2-carb-005055 LAMBRETTA SERIES1 AND 2 AIR HOSE CLIPS FOR STANDARD 5 '005050 5056 air-hose-vespa-vna-005056 6.5 ...ANSWER
Answered 2021-Mar-10 at 22:52Add a reference from the VBA editor (Tools -> References...) to Microsoft ActiveX Data Objects; choose the latest version, usually 6.1
Then you could write VBA code like the following:
QUESTION
I have a SQL view (IdView
) and it is having below values. I have only read access to this view and dont have any access to underlying tables.
ANSWER
Answered 2021-Mar-01 at 14:45The way you are doing this is bringing information per line. One way to solve it would be to develop a serialization function before returning to control, like a DTO.
Another solution would be to map the entities correctly and try to perform the same select, so that in this way it returns as expected
QUESTION
When using interrupts, any kind of digitalRead should be obsolete, or so i think. Let me explain my understanding of this to show my problem:
Say, a quadrature incremental rotary encoder (RE) is pulled up on both signal pins and is therefore idle HIGH. If i configure an interrupt service routine (ISR) on the falling edge on both pins and have the ISR for pin B do nothing more than set the flag "flag_B" to false (representing the logic state at the pin) and the ISR for pin A sets or resets a flag "flag_clockwise" depending on the state of flag_B during A's ISR, then i should get the right direction for every turning step, right? My only task is to then set the state of pin B to high again after the ISRs and my code should be ready for the next interrupt. But that doesn't work, with many random cases of the wrong direction being displayed or showing counter clockwise on the first half of the turning step when you can feel a little "bump" while turning the knob and then going clockwise on the second half, when the shaft has completed a single step, basically performing two opposite actions while only turning one step. Is my logic flawed? All signals are debounced in hardware and look like expected on the oscilloscope.
ISRs:
...ANSWER
Answered 2021-Feb-27 at 23:03Even if the pin is assigned as interrupt, you can still use digitalRead()
to determine the direction. For example:
QUESTION
the model is as simple as this: I'd like to apply a torque to the Rotational Flange of a Revolute Joint.
However, the torque reaction should not be applied to the Support Flange of the Revolute Joint.
The torque reaction is indeed counterbalanced elsewhere and not in the Revolute Joint itself.
A real-world example is a vehicle wheel: the torque is given by a powertrain and transferred to the wheel by a shaft, so the torque reaction is not perceived on the wheelhub but on the powertrain mounts.
So, none of the above seems to be correct:
- in BLUE: there is a reaction on the Revolute frame_a that there shoudn't be. The support (white circle) seems to always balance the torque applied to the flange (gray circle)) but it doesn't make sense in this case;
- in RED: there is no reaction on Revolute frame_a but there is no speed in the 1D line and this is not ok.
So, how can apply a Torque to a Revolute Joint without being forced to sense the counterbalanced torque directly on the joint?
...ANSWER
Answered 2021-Feb-24 at 17:43I came up with this solution that requires modifying the Revolute joint.
This is a minimal library with the modified Revolute Joint and a minimal example
Basically I just required that the torque on frame_a and frame_b is equal only along two directions orthogonal to the revolute axis (before they were equal along any direction).
And the torque called 'tau' provided by the auxiliary flange is applied along revolute axis direction only to frame_b, while for frame_a along this direction the torque is imposed to be zero.
This makes much more sense to me, but I'll be glad if someone proves me wrong.
As @tbeu just saw, I also sent an issue to the Modelica Standard Library GitHub, so it might be worth to wait for some official answer.
QUESTION
I have a form where I am trying to show and hide different input fields based on a user selection from a dropdown menu. I have it working in that when an option is selected, it shows the desired form, but hides everything around the form as well. If I set it to not hide anything and only show, it displays one form after the other.
What I am trying to do is set it so that when a user makes a selection, it displays the relevant forms without hiding anything extra, and if a user selects a new form, the new form is displayed and the old one hidden, all without hiding the pre-existing elements that are there from the beginning.
HTML
...ANSWER
Answered 2021-Jan-15 at 22:11After some more looking around and playing with it, I did find a solution, though I don't think it is written as well as it could be, but it works.
jQuery that worked
QUESTION
I am writing a blade stress routine all input fields should be numeric.
The Claculate button will calclate then sometimes refresh (you can see the table fill out coming from the script) the refresh takes out the table answers and all the filled in values.
When it doesn't refresh I can then print the page or change values and hit calculate again. This is the intention of the HTML App.
Is there spmething that I don't know about browsers?
I have tried on Opera with debug on finish the whole Calc1() funtion then keep tracing goes to Opera code so hit F8 and it will sometimes work sometimes refresh the page. I have tried Chrome Firefox is not working propely on the computer will have to reload it.
Thank you for any feedback that can solve this problem.
Here is my code:
...ANSWER
Answered 2021-Jan-15 at 20:48You're using
tag to something like a
.
QUESTION
I'm trying to create an arrow with its arrowhead moving from a starting point and ending at its target. Moving the arrowhead was achieved successfully with the tip from @Robert Longson. I want the end of the shaft also to follow the arrowhead and grow to its full length. The code is given below and notice that the shaft isn't growing with the arrowhead and also ends up in partial length. Is there a way to correct this. Any help will be greatly appreciated.
...ANSWER
Answered 2020-Dec-10 at 18:21Like this I guess. Note that you could have done this in SMIL too.
I've set the animation to be forwards so it remains at the end, otherwise the curve disappears at the end of the animation.
The console.log line shows you where I got the number from.
QUESTION
I wanted to make a "Thick Arrow" mesh i.e. an arrow like the standard Arrow Helper but with the shaft made out of a cylinder
instead of a line
.
tldr; do not copy the Arrow Helper design; see the Epilogue section at end of the question.
So I copied and modified the code for my needs (dispensed with constructor and methods) and made the changes and now it works OK:-
...ANSWER
Answered 2020-Dec-03 at 15:14You can apply lookAt
to any Object3D
. Object3D.lookAt( ... )
You have already discovered that lookAt
causes the shapes to point in the +Z
direction, and are compensating for that. But it can be taken a step further with the introduction of a Group
. Group
s are also derived from Object3D
, so they also support the lookAt
method.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install shaft
On a UNIX-like operating system, using your system’s package manager is easiest. However, the packaged Ruby version may not be the newest one. There is also an installer for Windows. Managers help you to switch between multiple Ruby versions on your system. Installers can be used to install a specific or multiple Ruby versions. Please refer ruby-lang.org for more information.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page