Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: Davek0974 on October 16, 2016, 08:24:06 AM

Title: Display of analogue input?
Post by: Davek0974 on October 16, 2016, 08:24:06 AM
This is what i have....

CSMIO-Ip/A with spare analogue input 0-10v
VFD with analogue output programmed to show motor power in kW ranging from 0 to 150% as a 0-10v signal
Mach3

What i was thinking of is...

Adding a DRO to the screen that shows spindle power, either as kW or as % from 0 to 100% etc

Not important - just a bell or whistle but you know how it goes :)

So, is this possible? I am unsure as to the method of connecting the input signal to the DRO, the electrical side seems pretty well matched so thats easy.

Maybe a brain?
Title: Re: Display of analogue input?
Post by: Hood on October 16, 2016, 09:29:38 AM
Just use a Brain or the Macropump to read the IP-A's input, do any calculations required and write it to the user DRO of choice.

Hood
Title: Re: Display of analogue input?
Post by: Davek0974 on October 16, 2016, 09:37:09 AM
Nice :)

I guess % is easiest - if the 0-10v = 0 to 150% then 6.67v is about 100%

Will have a play ;)
Title: Re: Display of analogue input?
Post by: Hood on October 16, 2016, 09:45:32 AM
Yes, as long as the voltage is linear it will work well.
Just read via the modbus  from the IP-A in a brain, do your calcs and have the brain write to the user DRO.
I do it on the lathe and Beaver mill for Feed and Spindle overrides via analogue inputs on my PLC, they both use SmoothSteppers so no luxury of the ready converted analogue to digital that the IP-A has :D


Hood
Title: Re: Display of analogue input?
Post by: Davek0974 on October 16, 2016, 09:57:33 AM
Well i'll have to presume they are linear, most 0-10v stuff seems to be.

Modbus or GetInput(82) for channel 2?

Not read modbus before :)

Looks like 10v = a value of 4095 with GetInput(xx)

A division by 27.30 should give me 150% display for 10V
Title: Re: Display of analogue input?
Post by: Hood on October 16, 2016, 10:40:11 AM
If doing via a Brain it would be the Modbus you would use.
Can't recall exactly how it is set up for the IP-A in the Brain and no way am I going down to the workshop today to find out, screaming here and it is about high tide so the road will be about 500mm deep in sea water :D
Title: Re: Display of analogue input?
Post by: Davek0974 on October 16, 2016, 10:55:35 AM
No worries, got feet up here too, drinks time :)

I seem to prefer macro pump but will look up modbus etc

Have added a user DRO to screen ;)
Title: Re: Display of analogue input?
Post by: Hood on October 16, 2016, 02:10:32 PM
My preference would likely be Macropump as well but if the macropump has too much in it it can get slow so Brains are an alternative if you already have plenty in the macropump.

Hood
Title: Re: Display of analogue input?
Post by: Davek0974 on October 17, 2016, 04:47:45 AM
If i have the DRO defined as three digits, no decimals do i need to concern myself with the sum being fed to it??

Say the input is reading 3189 then my sum is SetUserDRO(1010, GetInput(82)/27.3) which gives me a value of 116.813% (range is 0 to 150%)

Can i ignore the decimals?
Title: Re: Display of analogue input?
Post by: Hood on October 17, 2016, 06:42:28 AM
As long as the DROs format string has defined it as no decimals then it will just display the whole numbers.

Hood
Title: Re: Display of analogue input?
Post by: Davek0974 on October 17, 2016, 06:44:53 AM
Nice

ta
Title: Re: Display of analogue input?
Post by: Davek0974 on October 17, 2016, 01:28:42 PM
Well, that was too easy, almost a non-event :)

Programmed the vfd, hooked up the analogue output to the CSMIO, added the line to the macro-pump and updated the screen-set.

https://youtu.be/K8mDCgCgBZU

Not sure on scaling yet, if 2200W is 100%, what % is 400W??
Title: Re: Display of analogue input?
Post by: Hood on October 17, 2016, 01:43:21 PM
100/2200 x 400 = 18.1818181818%
Title: Re: Display of analogue input?
Post by: Davek0974 on October 17, 2016, 02:01:19 PM
Nice, thanks.

will tweak the scaling factor in the vfd a little :)
Title: Re: Display of analogue input?
Post by: Davek0974 on October 17, 2016, 03:06:59 PM
Seems like it may be a typing error that caused the disparity in readings - the quick start manual i got the 150% output from does not match the full manual i just downloaded which states 120% output power.

Using 120% as max now gives me a divisor of 34.125 of the DAC input and a quick trial and error calculation gives me a display of 17.9% or thereabouts - almost spot-on :)

Will change the macro tomorrow.
Title: Re: Display of analogue input?
Post by: Hood on October 17, 2016, 05:13:36 PM
Is that really the spindle load?
Usually it is the current that is looked at to determine the load but  that is with servos, it may be  the VFD itself is using the current and converting to Watts for the display?

For my load meter I used the continuous rated current for 100% and have it scaled so that 10v is equal to 150% of rated current. Unfortunately my servo drive will put out +/- 10v depending on the direction so I couldn't use the analogue input of the PLC to take it to Mach. I made up a wee board that would invert the voltage if a negative but failed miserably trying to make an amplifier to account for the losses in the rectifier diodes. Ended up just hooking up an analogue meter and it works well.
https://www.youtube.com/watch?v=lZ7asQ2PBGQ

Hood
Title: Re: Display of analogue input?
Post by: Davek0974 on October 18, 2016, 02:20:49 AM
This sounds familiar, Hp, kW, Torque..... ;)

I have no idea really, I just presumed that if the motor is rated 2.2kW and the output is showing 0-10v as 0-120% of 2.2kW then that must be the figure to use, I can switch the output to 0-120% of rated motor Amps instead if that is better?

Is that not the same as reading motor watts? Surely if the motor is flat-out then it makes no odds what you read as they will all be 100% motor rated values?

Is there a difference?

What is spindle load measured in ? Nm, kW, motor Amps??

Seems i have all values to play with so whats best ?
Title: Re: Display of analogue input?
Post by: Hood on October 18, 2016, 02:47:57 AM
The units of a load meter? Load I suppose :D
As I said usually it would be current, the harder the spindle has to work then the more current it requires. Now whether your VFD is doing that in the background and giving you a KW display I have no idea.
Might be possible to test, if you can put a load on the spindle and see if the KW ramps up, maybe put a holder with a length of steel in it. Have it close to a vice and then start the spindle (slowish) and use a brush shaft to lever between the vice and the steel in the holder and see if the KW ramps up as the load increases.

Hood
Title: Re: Display of analogue input?
Post by: Davek0974 on October 18, 2016, 02:56:57 AM
Oh, it certainly ramps up :)

I just have to flick the spindle brake to get it to peak :)

The BP brake is what, about 5" dia by 5/8" tall? So that represents a massive load compared to a small cutter, you only have to bring it on lightly when running to get a full-power load for a second or two;)
Title: Re: Display of analogue input?
Post by: Hood on October 18, 2016, 02:59:44 AM
That sounds fine then, looks like the KW display is indeed being linked to the load on the motor and is not just related to rpm. :)

Hood
Title: Re: Display of analogue input?
Post by: Davek0974 on October 18, 2016, 03:08:28 AM
Yep, thats what i figured, i just need to get the exact output - 150% or 120%, have just mailed the supplier for verification as to which parameter sets the limit it would use. One manual states 150%, the full manual lists 120%  :)

Its an impressively simple little add-on though, the CSMIO is indeed a great little controller.
Title: Re: Display of analogue input?
Post by: Davek0974 on October 18, 2016, 02:53:15 PM
It was set for 150% output so i just added a little scale factor in the VFD, display is now as accurate as i can get it :)
Title: Re: Display of analogue input?
Post by: Hood on October 18, 2016, 07:00:55 PM
:)