Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Moderators: TomKerekes, dynomotion

Post Reply
marcnach
Posts: 4
Joined: Sun Mar 10, 2019 9:43 pm

Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by marcnach » Mon Mar 11, 2019 1:47 am

Hello All
I posted a year ago on CNCZone about retrofitting a 6 axis press brake with KFLOP/Kanalog and have made slow but significant progress and I'm now at the point of hooking up the 2 servo valves, 3 proportional valves and 2 dual solenoid, spring centered directional valves. I came to realize that I needed more current than was available from the outputs from K/K so have been on a quest to remedy that with 3rd party amp cards such as Rexroth, Vickers, etc. In my quest I started to realize the outputs I need (PWM to change from Kanalog's +/-10v control signal to current at 0-350ma and as much as 800ma for the valve solenoids, dithering, ramping up and down, current sensing, deadband, etc) could all be handled by a SnapAmp card set at brush motor settings. I haven't seen any posts related to this so if they are there then I apologize in advance and a redirect would be appreciated. The brake has linear differential encoders that are wired into Kanalog as single ended encoders (with small daughter cards to convert the signals) but since SnapAmp has differential encoder inputs it would seem to be less awkward, convoluted and more efficient to wire them directly into the SnapAmp.
Has anyone done this or can you see why it would or wouldn't work? The max voltage clamp, max and min current, dithering and ramp settings seem to be able to be set in a simple C script file that would load at boot up, although at this point I have much to learn about the programming aspect of this endeavor so please pardon my ignorance. To my thinking the valve solenoids are tantamount to linear motors, albeit very short stroke (0.060 spool movement). Each servo valve has only one bi-polar solenoid (opposing coils wired internally in parallel) which seem to be activated together in a push-pull arrangement as the current changes. This regulates a pilot circuit in the valve so the total solenoid force (current) needed for actual machine motion is much less.
As I said previously I'm ignorant at this point about the C programming aspect of this project and any help there or guidance would be greatly appreciated.
Any thoughts or advice? Thank you for your help in advance.
Marc

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by TomKerekes » Mon Mar 11, 2019 2:31 am

Hi Marc,
I'm now at the point of hooking up the 2 servo valves, 3 proportional valves and 2 dual solenoid, spring centered directional valves.
It isn't clear what type of devices these are or what their difference is, but if they all basically operate as a coil where a current needs to be applied then SnapAmp might work. Each SnapAmp can drive 4 coils. So to drive 7 coils 2 SnapAmps could be used.
In my quest I started to realize the outputs I need (PWM to change from Kanalog's +/-10v control signal to current at 0-350ma and as much as 800ma for the valve solenoids, dithering, ramping up and down, current sensing, deadband, etc) could all be handled by a SnapAmp card set at brush motor settings.
One issue with SnapAmp might be the resolution of current. In normal Brushed DC mode the current range is +/- 35Amps controlled with +/- 1024 command counts. So this is ~35ma/count. So your 0-350ma device would only have 10 current levels. Output resolution is sometimes not that critical as the output is integrated over time. Especially if motion is relatively slow. For example it can be possible to control room temperature quite accurately with only 2 output levels (heat on/off).

Also depending on the coil parameters (resistance) you might be able to use SnapAmp's voltage output mode (PWMR). In this case if an appropriate power supply voltage is used then SnapAmp's 9-bits of PWM resolution might give much higher output resolution.
The brake has linear differential encoders that are wired into Kanalog as single ended encoders (with small daughter cards to convert the signals) but since SnapAmp has differential encoder inputs it would seem to be less awkward, convoluted and more efficient to wire them directly into the SnapAmp.
I don't really understand this. Kanalog has differential encoder inputs. Single ended signals can not be connected to Kanalog.
To my thinking the valve solenoids are tantamount to linear motors, albeit very short stroke (0.060 spool movement). Each servo valve has only one bi-polar solenoid (opposing coils wired internally in parallel) which seem to be activated together in a push-pull arrangement as the current changes. This regulates a pilot circuit in the valve so the total solenoid force (current) needed for actual machine motion is much less.
I don't follow how the opposing coils would work, but anyway I would expect it to work. Feedback from the encoders would vary the output to somehow control the speed and position.

You might have seen BigToy302's wonderful build Thread:

Regards,

Tom Kerekes
Dynomotion, Inc.

marcnach
Posts: 4
Joined: Sun Mar 10, 2019 9:43 pm

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by marcnach » Mon Mar 11, 2019 3:47 am

Hi Tom
Thank you for your prompt response. I will delve deeper into the resolution of current issue that you mentioned because I need to understand how that works.
As far as the differential encoder issue, I was mistaken and had it backwards - the encoders from the backgauge motors put out a single ended signal which I had to change to differential with the daughter cards, but the linear encoders for the ram already put out a differential signal so hooking them up to the SnapAmp would be no problem, unless it is better to leave them going to Kanalog directly?
The solenoid coils have from 17 to 25 ohms of resistance if I remember correctly. I will have to learn about the PWMR mode also. I have enclosed a picture of the coil schematic - I have the Schneider servo valve on the right. It somewhat shows the relationship of the coils and how they are opposed electrically with only 2 leads going to the control. https://www.dynomotion.com/forum/downlo ... iew&id=562

Again, thanks for your guidance.
And BigToy302's build thread is very cool!
Attachments
SERVO VALVE SCHEMATIC.jpg

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by TomKerekes » Mon Mar 11, 2019 5:06 pm

Hi Marc,
As far as the differential encoder issue, I was mistaken and had it backwards - the encoders from the backgauge motors put out a single ended signal which I had to change to differential with the daughter cards, but the linear encoders for the ram already put out a differential signal so hooking them up to the SnapAmp would be no problem, unless it is better to leave them going to Kanalog directly?
The encoders can be connected to the differential inputs on Kanalog or SnapAmp. Kanalog has the advantage of screw terminals and 470ohm Termination built in.
The solenoid coils have from 17 to 25 ohms of resistance if I remember correctly. I will have to learn about the PWMR mode also.
So yes if the resistance is say 24 ohms than a 12V supply fully on would only provide 500ma and so the output resolution would be good. There isn't any direct support for PWMR mode. You would need to use a few lines of C Program to take the Servo Output and write it to the SnapAmp PWM using the PWMR mode. Similar to using a KFLOP PWM as described here wxcept using a void WritePWMR(int ch, int v) call.
Regards,

Tom Kerekes
Dynomotion, Inc.

marcnach
Posts: 4
Joined: Sun Mar 10, 2019 9:43 pm

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by marcnach » Mon Mar 11, 2019 9:16 pm

Hi Tom
Perhaps what I'm trying to do isn't how it's supposed to be done according to your message. What I'm envisioning is the +/-10v DAC servo control output from Kanalog being sent to the SnapAmp which subsequently takes that signal and converts it to a PWM output that is sent through the OUT0/OUT1 on the SA PWM channel 8 (for one of the servo valves, channel 9,10,11 for other axes) to the valve solenoid. The signal would be varying constantly as needed to maintain or achieve whatever position is desired by the control based on the linear encoder input.
As I was researching this message the question arose in my mind that where does the DAC output from Kanalog input to the SA? Can it be transmitted through Kanalog/KFLOP to SA internally or "can I not get there from here"? It isn't clear to me how SA gets it's command signals from K/K so that it outputs the proper signals to brush type or other motors in general. It would seem that the digital I/O on JP7 would be either on or off, not varying as the +/-10v signal would be as an input, and the optos the same way. So how is the SA controlled in the first place? Am I missing something?
Once again, apologies for my ignorance.

This is the spec sheet for my servo valves - I don't have the integral electronic package on the second page, only the solenoid part but the electrical data it needs is the same. (eg: current max, input signal, internal coil resistance, flow direction @ control voltage, etc)
https://www.dynomotion.com/forum/downlo ... iew&id=565
Attachments
SCHNEIDER HVM-090-en pg1 & 3.pdf
(203.8 KiB) Downloaded 341 times

Moray
Posts: 282
Joined: Thu Apr 26, 2018 10:16 pm

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by Moray » Tue Mar 12, 2019 12:38 am

What Tom means when he mentions using a C program with a few lines of code to control the PWM, is each servo loop/channel within the KFlop outputs a value. With normal servo/stepper use, the channel configuration will handle that value internally. However if you want to do something 'non-standard', you can set the OutputMode value to no output (i.e. ch2->OutputMode=NO_OUTPUT_MODE; ) then use the output value within a C program to do something 'non-standard'.

It's a feature I use for the spindle on my lathe. It uses a VFD, which needs a 0-10V speed signal, along with activating the required direction relay. This isn't a standard output option for a KFlop channel, so I have a few lines of code that take the channel output value, then depending on value, activates the required direction relay, then sets a Kanalog DAC, flipping the value if needed so the DAC is only ever positive.

Here's the code from my lathes init.c that handles the DAC. It's within an infinite loop, so runs continually-

Code: Select all

// **** Start Spindle Control ****
		// As the standard channel output options can't handle 0-10V, we have to deal with it here
		if(persist.UserData[STATEVAR] != 0)	// if spindle is not off, we need to set DAC value
		{
			if(ch2->Output > 0)
			{
				DAC(SPINDLE,(int)ch2->Output*-1);
				
			}
			if(ch2->Output < 0)
			{
				DAC(SPINDLE,(int)ch2->Output);
			}
		} else {				// else spindle is off, so we've set the DAC to 0
			DAC(SPINDLE, 0);
		}
		// **** End Spindle Control ****
The direction relays are set/unset in separate CW/CCWOff C programs that run via the required M code actions.

User avatar
TomKerekes
Posts: 2529
Joined: Mon Dec 04, 2017 1:49 am

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by TomKerekes » Tue Mar 12, 2019 3:30 pm

Hi Marc,
As I was researching this message the question arose in my mind that where does the DAC output from Kanalog input to the SA? Can it be transmitted through Kanalog/KFLOP to SA internally or "can I not get there from here"? It isn't clear to me how SA gets it's command signals from K/K so that it outputs the proper signals to brush type or other motors in general. It would seem that the digital I/O on JP7 would be either on or off, not varying as the +/-10v signal would be as an input, and the optos the same way. So how is the SA controlled in the first place? Am I missing something?
SnapAmp doesn't require analog inputs (or Kanalog) at all. Instead KFLOP tells SnapAmp what to do through high speed digital communication through the ribbon cable connection to KFLOP JP4.
Regards,

Tom Kerekes
Dynomotion, Inc.

marcnach
Posts: 4
Joined: Sun Mar 10, 2019 9:43 pm

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by marcnach » Thu Mar 14, 2019 5:41 pm

Good morning
Apologies for the delay getting back to you.
Before I waste any more of everyone's time I'm going to educate myself more on C programming and KFLOP/Kanalog usage and really try to identify the best way to set up this brake and it's hydraulics. It seems that I have digressed and am trying to do workarounds instead of going for the most straightforward, sensible solution without breaking the bank in the process. Using SnapAmp seemed like a good idea but I think it may be too convoluted and complicated for this application. If anyone has a comprehensive plan that doesn't cost multi thousands of dollars and can build off of my current KFLOP/Kanalog configuration then I would love to hear it. There are many systems out there that use a control, PLC and valve amps and drives that seem to be fairly straightforward, uncluttered and less complicated so I will be emulating their efforts and try not to get sidetracked. Again, I do welcome any and all advice from anyone on the best way to move forward on my project.
I'll come back when I have something intelligent to add to my build history.
Thank you for your help and guidance.
Marc

Moray
Posts: 282
Joined: Thu Apr 26, 2018 10:16 pm

Re: Use SnapAmp with KFLOP/Kanalog for hydraulic servo valves?

Post by Moray » Thu Mar 14, 2019 11:35 pm

In all honesty, some relatively simple timer circuits that take the Kanalog analogue outputs and convert them to PWM would likely do the job.

It's definitely not an area I know that much about, but I'd guess pass the kanalog output into a voltage divider (aka a couple suitable resistors) to improve resolution, then use that to control a 555 chip, which then drives a suitable transistor(s) capable of the required current. I'm sure there are probably suitable pre-built boards available that do just this, however the relatively low current requirement may limit choice.

Then for your dual coil valves, simply use a DPDT relay to flip the output when required, however if that's a directional valve, then you just need to power it whatever direction is required, as a directional valve would normally be on or off, not proportional.

Post Reply