So I implemented a simple proof of concept for voltage to frequency input using an arduino to read an analog value and convert that into a pulse stream using a tone() function. I started with values between 100 and 1000 Hz and wired the output to a Mesa 7i37 optically isolated input, so I could run the Arduino on a separate power supply with no risk.
The 7i37 has ~7us response, so I thought that would not be a problem in terms of response time. However, this PC runs with a base period of 30,000 ns (I use a Mesa card for the encoder heavy lifting and so have not needed really anything on the base thread). It seems to me that should be fast enough (33,333 hz) to accurately sample a 1000 Hz signal, but at anything above about 250Hz the velocity output of the encoder basically goes random, as if counts are being missed. HAL Scope basically confirms this, although I am not sure if HAL Scope as launched within a pncconf-generated axis config is running on the servo or base threads. Additionally, on the low end of Hz, the software encoder velocity seems to fluctuate fairly wildly as the pulses are not fast enough. I suspect there is a way to smooth this, but honestly I'd prefer to get the encoder pulses counted faster so this interpolation is not an issue. I understand I could run an encoder input with the counting done by the Xilinx chip, but the way the standard 5i23 firmware images work I only have one of those available (and not optically isolated) versus lots of arbitrary isolated I/O, so I'd prefer to do it in software if I can, as I ultimately would like to run more than one analog input optically isolated. Any suggestions? Thanks in advance, Scott On Fri, Mar 9, 2012 at 7:25 AM, Scott Hasse <scott.ha...@gmail.com> wrote: > > it is unclear, if the problem is with the hardware, or with the signal > handling within LinuxCNC... > > Really both, but I've gotten solid advice on both as well. Hardware-wise, > the Mesa board looks good for my application. > > Signal-handling-wise, I thought that an M66 analog read could be set to > return immediately and set the analog value to #*5399 for subsequent use > in conditional logic. I'll play with it, but I think this lets me get it > done in gcode only.* > * > * > *Scott* > > On Fri, Mar 9, 2012 at 1:51 AM, Viesturs Lācis > <viesturs.la...@gmail.com>wrote: > >> 2012/3/9 Dave <e...@dc9.tzo.com>: >> > Mesa has their THC board that I believe does exactly what you are >> > looking for. >> >> Dave, I think that it is unclear, if the problem is with the hardware, >> or with the signal handling within LinuxCNC... >> >> > Look at the very last item on this page: >> > http://www.mesanet.com/ >> >> Scott, THCAD-10 is the name of the board, look under "anything i/o >> daughter cards" at the very bottom. >> >> Viesturs >> >> >> ------------------------------------------------------------------------------ >> Virtualization & Cloud Management Using Capacity Planning >> Cloud computing makes use of virtualization - but cloud computing >> also focuses on allowing computing to be delivered as a service. >> http://www.accelacomm.com/jaw/sfnl/114/51521223/ >> _______________________________________________ >> Emc-users mailing list >> Emc-users@lists.sourceforge.net >> https://lists.sourceforge.net/lists/listinfo/emc-users >> > > ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ Emc-users mailing list Emc-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/emc-users