- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Interface between Mesa 7i77 and Granite Devices VSD-E servo amplifier
Interface between Mesa 7i77 and Granite Devices VSD-E servo amplifier
- DeckelHead
- Offline
- Elite Member
- Posts: 166
- Thank you received: 2
Let me set the stage a bit... I'm bringing up a system that has been sitting for several years and I'm finally getting back to it. Most everything is done, but when I mothballed the project, I was working on the interfacing of two signals of interest: ENABLE and FAULT. The Mesa card has a Field voltage of 24VDC and the VSD-E generally has I/O of 5VDC
The ENABLE signal is connected to an OUTPUT port on the 7i77 and to the HSIN2 port (pin #5) of the VSD-E. That is an opto-isolated port using an HCPL2631. My thought there is to drive the port with a supplemental series 10K resistor. Unless I'm missing something, that should be sufficient.
The FAULT line is a bit more problematic. The output port on the VSD-E (pin #11) is an HCPL2531. Granite Devices' documentation indicates that IO-Vcc for this is 5VDC. Reading the documentation for the Mesa card, it seems like the only way to get the INPUT pin there to read TRUE is to drive the pin to the field voltage, or 24VDC. To perform this action, it seems like I will need to use a small opto-isolator board such as the GeeTech G213 (www.geeetech.com/d213-optoisolator-break...jau1i5b1274026i6sm97), a few of which I have laying around.
Is this consistent with your design? I really don't want to blow up my VSD-E drives!
Any thoughts or ideas are always welcomed. If you have a question, please feel free to ask.
Thanks
Alan
Please Log in or Create an account to join the conversation.
The VSD-E manual does suggest an external resistor for widening the input voltage range of the opto-isolated inputs.
They are shown with an internal 220R resistor. The manual also says that the current threshold for activation is 6.3mA. Rather helpfully they also specify the input device used. (uk.rs-online.com/web/p/products/1241346/ ) At 5V the current through the opto (1.4V fwd voltage from the datasheet) is (5V - 1.4V) / 220R = 16mA. To keep the same current at 24V you would need a total resistance of (24V - 1.4V) / 17mA = 1400R.
There is already a 220R in circuit, and the working current of the inputs is actually at the top end of the recommended range, so I think I would choose a 1.5k additional series resistor for a working current of 13mA.
Also, to be cautious, I would first activate the inputs through a multimeter in mA mode to make sure that the input current through the opto was >6.3mA and <20mA.
If you set the card to Mode 3 then four of the inputs (16, 17, 18, 19) have their logic threshold set to 2.5V. If you are not using MPGs on those pins then this seems like one answer.
Alternatively you could use the analogue inputs (in modes 1, 2 or 3) to read the fault output voltage and convert to true/false in HAL.
Or add a TTL logic expander board on the smart-serial expansion connector: store.mesanet.com/index.php?route=product/category&path=83_88
The 7i73 is cheapest, but the 7i69 might suit better.
Please Log in or Create an account to join the conversation.
You cannot use the MPG input to get 2.5V thresholds with 12V or 24V VField because these have 2.5v thresholds for the MPG encoder logic only, not the digital inputs.
Also if you need lot of TTL level I/O a 7I90HD is probably a better choice than a 7i69 (72 I/O vs 48 and $59 vs $69)
Please Log in or Create an account to join the conversation.
You cannot use the MPG input to get 2.5V thresholds with 12V or 24V VField because these have 2.5v thresholds for the MPG encoder logic only, not the digital inputs.
I was hoping you would pop in with a definitive answer on that one.
Also if you need lot of TTL level I/O a 7I90HD is probably a better choice than a 7i69 (72 I/O vs 48 and $59 vs $69)
It looks like he might only need 3 x 5V inputs, so maybe the 4 x analog inputs will be enough?
Please Log in or Create an account to join the conversation.
Please Log in or Create an account to join the conversation.
- DeckelHead
- Offline
- Elite Member
- Posts: 166
- Thank you received: 2
You guys have jogged my memory in a few areas, and that is great.... One thing I can't really do is change the output side of the Mesa because it is driving 24VDC relays. And, yes, my napkin math was wrong. I meant 1K not 10K, along with the the 220 series resistor already present. Your idea about validating an in circuit representation with a DVM is something I would have done but it is also good of you to suggest the same for someone else reading this thread later on; so, thank you for bringing that up.
An area that I had totally forgotten about is and that I believe you are driving towards is splitting off the input and output voltages used for I/O (sorry, I am intentionally avoiding Vin and Field because I don't have the documentation in front of me right this second). I vaguely recollect that this is possible and it may be the best solution for me. Ironically, I inserted an opto-isolator board into the limit switch area that takes the native Hurco 5VDC output and made it compatible with the Mesa 24VDC input. But, I could easily change the output target for that opto board to 5VDC if I want.
My next task, then, is to re-read the section regarding Vin and Field. If I can make the input side compatible with 5VDC while keeping the output at 24VDC then I think I'm set. I'll change the existing output side of my isolators for the limit switches to 5VDC and then wire up the Granite Devices' output (FAULT) opto isolators directly to the Mesa inputs. If it works the way I think it will, then that would be the easiest solution (still keep the 1K resistor in the ENABLE output as that would be limiting the current from the Mesa 24VDC).
One final note, although it sounds academic at this point... I do want to stay away from using the MPG Mesa I/O. I expect that I will be using those for the stated purpose.
Cool. You guys gave me some great ideas to research. The help is appreciated.... Have a great holiday season.
Please Log in or Create an account to join the conversation.
I suspect the easiest way to sense 5V is what Andy suggested, use the analog inputs for 5V sensing
and run the outputs at 24V for your relays
We do have some experimental firmware for the 7I84 which could be ported to the 7I77
that separates the input thresholds from the output voltage by making the input thresholds
settable from LinuxCNC but we don't have a time frame for porting this yet
Please Log in or Create an account to join the conversation.
- DeckelHead
- Offline
- Elite Member
- Posts: 166
- Thank you received: 2
The analog input idea is something I was never even aware I could do. I glossed over that part of the manual because it (at the time) didn't seem relevant to what I was trying to accomplish. As I really only need 3 inputs, I am happy to dedicate IN0, IN1, IN2 to my X, Y and Z fault inbound lines (7i77 perspective). If I'm reading it all correctly, I would want Mode 3 because I do want to have an MPG on my control panel. I don't quite know what "field voltage analog in" means in the context of the manual's description though. Mode 2, 3 spells that out explicitly...
Somewhere in the system (HAL or LinuxCNC configuration), the 5V value from the servo drive will how to be converted to a TRUE or FALSE. I don't quite know where that is accomplished yet but it seems reasonable to assume that such an ability exists....
Your comments on the MPG have made me question whether or not I have a looming problem there though... If I have a 24V field, is that going to be a problem for me? I'm guess not, but confirmation is always a good thing
Please Log in or Create an account to join the conversation.
Somewhere in the system (HAL or LinuxCNC configuration), the 5V value from the servo drive will how to be converted to a TRUE or FALSE. I don't quite know where that is accomplished yet but it seems reasonable to assume that such an ability exists....
Yes, you would use something like
loadrt comp count=3
...
addf comp.0 servo-thread
addf comp.1 servo-thread
addf comp.2 servo-thread
...
net fault-0-analog hm2_5i25.0.7i77.0.0.analog0 => comp.0.in0
setp comp.0 in1 2.5
setp comp.0.hyst 0.25
net fault-0 comp.0.out => axis.0.amp-fault-in
...
linuxcnc.org/docs/2.7/html/man/man9/motion.9.html
Your comments on the MPG have made me question whether or not I have a looming problem there though... If I have a 24V field, is that going to be a problem for me? I'm guess not, but confirmation is always a good thing
You can power the MPG from the encoder 5V (or any other 5V sharing the same GND)
Please Log in or Create an account to join the conversation.
- DeckelHead
- Offline
- Elite Member
- Posts: 166
- Thank you received: 2
Thank you both for all of the help. I have some reading, tinkering, and additional wiring to complete now, but I think I'm well on my way to having a viable solution.
Best regards and happy holidays,
Alan
Please Log in or Create an account to join the conversation.
- Configuring LinuxCNC
- Configuration Tools
- PnCConf Wizard
- Interface between Mesa 7i77 and Granite Devices VSD-E servo amplifier