Hello Guest it is April 28, 2024, 07:51:08 PM

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - HimyKabibble

1201
General Mach Discussion / Re: VB Is Laughing At Me....
« on: May 03, 2009, 06:48:27 PM »
Hi Ray,

I'm puzzled by your use of semiphores in the macro code.

As I thought about it, I think that Mach runs macros as a single thread. So I'm not sure how one could ever get the parallel execution of the macros that the semiphores seem to imply to me.

I'm also thinking that if this is necessary, there is a timing hole (since I don't see a way to get the DRO value used for the semiphore count and increment/decrement it in an atomic operation).

I suspect I have not understood an assumption your code makes...

Could you help me understand what you are protecting against with the use of semiphores in your macros?

Dave


Terry,

The primary purpose is to make execution sequential.  Without the semaphores, the high level macros could not tell when the low-level ones had completed, and would resume execution *before* the low-level ones were done.  In theory it should not happen, but I can assure you it did.  I could find no other way to make them work correctly.

Regards,
Ray L.

1202
General Mach Discussion / Re: VB Is Laughing At Me....
« on: April 29, 2009, 02:39:29 PM »
Ray,
I like that reason - I've used it a lot over the years...  ;)

I am not sure how to find the state info to save - but I guess I'll go looking to see if/how it can be done.
I just got a probe - so I'm prowling around posted macros to see what other people have done & what'd avail I can plagerize. My old programming days make me like routines that leave things as they found it. Seeing your macros made me think about GCode states.

Hum, I guess the next steps for me are to
1) list the states I might alter
2) figure out how to get get what they are (I'm not sure mach has a way to do that, it may, I just don't know enough yet to know)

Some things I am not sure I would want to save and restore - like active canned cycles - might be safer to just always cancel them -

Here's an idea: I wonder it people would find it useful if mach had a "Push state" and "Pop state" facility...?
Some things I am not sure I would want to save and restore - like active canned cycles - might be safer to just always cancel them (?) - I need to noodle these things a bit.
(Input from others is welcome)

Dave


Dave,

I think having save/restore state functions built into Mach would be really nice - save a lot of potential grief.  I would think you could roll your own, but it would take some research.  What I've found writing macros for Mach is you spend most of your time figuring out what the OEM codes *really* do, and how they behave - Far too often, they simply don't do what their names imply.  Some actual documentation would work wonders here.  Fortunately, there isn't a great deal of state to preserve, so I would think in a few hours you could track down all the OEM codes needed, and write the functions.

Regards,
Ray L.

1203
General Mach Discussion / Re: VB Is Laughing At Me....
« on: April 29, 2009, 10:26:33 AM »
Hi Ray,
I took a look thru your probing macros this evening - I like the general modularity.

I do have a question: I applaud the programming principal to save state on the way in and restore it on the way out of the low level macros. I see the code doing this for inc/abs mode and feed rate. However, the macros issue GO codes - which is modal change to the control - so the control will be in a G0 rapid state when the macrso exit (even if it was not when the macro was entered).

Is there a reason you did not grab the rapid/feed movement state up front and then also restore it on the way out?

Dave


Dave,

There is a reason, though it's not a very good one - I just didn't think of it!  :-)  I whipped those very quickly ( just a few hours), and they're the first significant Mach macros I've written.

How do I detect the current G0/G1 state?

Regards,
Ray L.

1204
It does appear to have dual outputs, so it may be worth investigating the AC secondary voltage values, it would not be hard to modify.
 

We have a guy who is obviousl not terribly adept with electrinics.  Do you *really* want to have him modifying a fairly high-power piece of electronics by remote control?  Sounds like a recipe for disaster (and possibly a trip to the emergency room) to me....

Regards,
Ray L.

1205
I think if he can find a zener diode that can handle this voltage at the current he needs, then it would be the best solution...

Daniel

That would be one bloody HUGE Zener diode, and it would be *constantly* dissipating as much heat as the motor running full load.  There is no easy way to get 72V down to 36V at the kind of currents required by a motor.  It requires a regulator.  The only viable solution is to buy a suitable 36V power supply.

Regards,
Ray L.

1206
If you use the voltage doubler you will have both 72v and 36v outputs. 

Robert

He has a 72V power supply, not a 36V supply.  He doesn't need a 144V supply....

Regards,
Ray L.

1207
Ray,

What determines the current capacity is the capacitors. And as you know, a capacitor can deliver enormous currents. As to the capacitance, you're right - you need the same capacitance twice - one for each half of the rectified signal.

Daniel

Daniel,

Sorry, but that's not correct.  Take a 24V/5A, or 170W, transformer, connect  it to a full wave rectifier and filter, and you'll have a 34V/5A, or 170W,  power supply.  Connect that same transformer to a voltage doubler and filter, and the power the transformer can deliver remains 170W, but you've douibled the voltage, so the current must be halved.  There's no free lunch here.

Regards,
Ray L.


Ray,

Got your point, you were meaning the bulk current capacity the transformer can deliver. But you never walk on the edge of the transformer's current capacity, and what is more important for a motor drive is the peak current - and this one can be quite large with any circuit using that big a capacitance.

With steppers for example, the drive would hardly draw 1/3 the motor's rated current. I have mounted an ammeter on the lathe where I used the voltage doubler circuit and the current never goes above 0.5~0.7A. The steppers are rated 2.1A.

However, as you pointed, a voltage multiplier circuit might not be good in systems that use servos, due to their tendency to draw large currents under load.

Daniel

You still size the power supply to the maximum continuous load it needs to support.  If the 36V supply is rated to handle the maximum load, and you then put a voltage doubler on it, you can no longer support the maximum load.  If your 36V supply has lots of "extra" capacity, then a doubler will probably work, but that would not normally be the case.  And a stepper motor *will* draw its maximum rated current when it is under maximum load.  That may not occur often, but when it does, if your supply drops out, the stepper *will* lose steps, if not stall.  In any case, the supply must be sized to support the maximum load, always.  My point still holds - whatever the continuous rated current of the 36V supply (and that is the way power supplies are spec'd and rated - not by instantaneous peak current), adding a voltage doubler *will* reduce it by half.

Regards,
Ray L.

1208
" . . . any variation in current with affect the output voltage."

This is what I don't get. Isn't this exactly what an 'unregulated' power supply does anyway? If so, why then is this an argument against knocking down the voltage with a resistor?

I'm not concerned with efficienecy or the resistor getting hot. The ones I bought are contained in finned alumuninum cases. I only spent 9 buck on the pair of them, so it's no biggie if I don't use them, but I would like to come away with a better understanding of this issue.

"Although unregulated, if designed for the maximum current, there should be minimum volt drop when highest current is drawn."

The little servo motor runs at 4A and draws a max of 20A at 36V. An onbvious solution is to buy another 36V 9A power supply and set the output current limit on the Gecko drive to 9A. But that doesn't make for a very interesting discussion.

How would one design an unregulated supply for this if they had availble 72V DC to start with instead of 110V AC? Is a transformer the answer?

The problem is the resistor will only give you the desired motor voltage at one current setting.  If the current is higher, the power wasted in the resistor increases, and the voltage at the motor decreases.  If the current is lower, the power wasted in the resistor decreases, and the motor voltage increases.  If you use a 9 ohm resistor you will get 36V on the motor *only* when it's drawing 4A, and it'll work fine under those conditions.  Under and conditions where the motor is drawing less than 4A, the motor will get higher voltage, because the voltage drop across the resistor will be proportionately less.  At 1A, the motor will see 63V.  The motor does *not* always draw 4A.  It draws 4A only at maximum load.

It's difficult to explain to someone without an electrical background why this is a bad idea, but it is.  The high voltage the motor *will* see at times will greatly increase the eddy currents in the iron of the motor.  Eddy currents cause heating, and the amount of heating is proportional to the square of the applied voltage, so doubling the voltage will quadruple the amount of heat generated.  This is why when choosing stepper power supplies you select the voltage based on the rated voltage and inductance of the motor, and don't simply go for the highest violtage you can put your hands on.

Designing an unregulated supply to deliver a specific voltage and current requires having a transformer with the proper voltage and current rating.  The output voltage will be the transformer rated voltage multiplied by the sqaure root of two.  So, a 24V transformer would be used to build a ~34V power supply.

Regards,
Ray L.

1209
Ray,

What determines the current capacity is the capacitors. And as you know, a capacitor can deliver enormous currents. As to the capacitance, you're right - you need the same capacitance twice - one for each half of the rectified signal.

Daniel

Daniel,

Sorry, but that's not correct.  Take a 24V/5A, or 170W, transformer, connect  it to a full wave rectifier and filter, and you'll have a 34V/5A, or 170W,  power supply.  Connect that same transformer to a voltage doubler and filter, and the power the transformer can deliver remains 170W, but you've douibled the voltage, so the current must be halved.  There's no free lunch here.

Regards,
Ray L.

1210
Hi,

Another option to get higher DC voltage is to use a "voltage multiplier circuit". It's a very simple, commonly known, circuit, utilizing  two diodes and two capacitors. I used it on my lathe since I didn't have a suitable outlet from the transformer to get 80VDC. So I got them from 28VAC using this circuit.

Daniel

Yes, but compare to a proper full-wave rectified supply it will have only half the current capacity, and will require double the filter capacitance to maintain the same ripple voltage.  Overall, not a good solution for a high-current device like a motor.

Regards,
Ray L.