Sampler I found is simple to use then executing it from using a M1xx
command, algorithm of shell script below:
1. Disable sampler.
2. Added an extra option to halcmd command read until buffer is
"empty", used number of samples zero. Execute with this option to empty
buffer.
3. Enable sampler
4. Run halsampler, there is parameter for selected channel and number
of samples set then using "M100 Pchannel Qsamples".
5. Disable sampler.
In 2. old values are flushed otherwise there may come old values first.
Sample data is saved into a file with file ending .csv and it
essentially is but with a space as separator, this work great. Think it
is a good idea to add emptying of buffer but are a little bit in doubt
about best solution? It might be sampling should be done until buffer is
empty then sampler is disabled, maybe the best option is as I did? Or
any better idea?
Even though samples have been flushed there is a overflow message then
samples is started, this is an annoyance and should be removed to
produce correct message but did not yet figure out how.
Shell command "halcmd show pin sampler.n.pin.* " show information about
sampler pin(s). In particular type and information about net where it is
connected. This printed information I plan to add an option so it will
come before sampled values which is very useful then data is saved in a
file, will also add either net information or pin as header for columns
but are uncertain at this point which is best. Do anybody know if there
is any not to hard method to access the information from "halcmd show
pin sampler.n.pin.* " from within C code? Or maybe calling the halcmd
command from C code is the best solution? Or maye I better look into the
halcmd code myself. This extra option to automatically add information
about which net the sampled values are connected, anybody else interested?
Nicklas Karlsson
_______________________________________________
Emc-users mailing list
Emc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-users