hey guys, I've been using EMC for a while but I'd really like to use EMC on my desktop, how feasable is an arm-based EMC install?
I would then just use X forwarding for control
has this been done?
x forwarding yes, arm no
Hi all. I'd like to send (copy?) the value of a ClassicLadder (CL) counter to a CL word value so I can send it out to a PyVCP display. The wiki has a little on CL, but I haven't seen anything on this. I think I'll be OK once I get it to the CL word, but how to get from the CL counter to the CL word?
use an assignment block, and just wire it straight across the ladder so it always runs
OK, I'll try it, BRB
so your assignment will be something like %QW0=%C0.V
%C0.V is the value of the counter C0
%QW0 is a CL s32 out
OK, will do. And as it happens, I am using C0, lol
I just happen to have exactly that in my ladder (for the same reason even)
is there any support in EMC for GPIO rather than parallel?
EMC2 supports many kinds of I/O hardware other than the parallel port
cradek: that doesn't seem very evident from the wiki
cradek: still up?
cradek: Your advice worked, but I'm having trouble with the "net foo classicladder.0.s32out-10 => pyvcp.display" part, it says "...s32out-10 does not exist". BTW, in the wiki at http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?action=browse&diff=1&id=ClassicLadder
in part "4. The realtime module exports HAL pins", there's a conflict: s32in.00 vs. s32out-00 . I'd fix it myself, but at this point...
...I'm not sure which version is correct. I'll keep after it though. The assignment worked though, I can see the counter value in CL Vars.
you'll probably find this later, goodnight and thanks for your help. I'll be around for awhile yet.
tomp is now known as tom3p
KimK: don't you mean s32out-00 instead of s32out-10?
the default number of s32outs is 10, so they are numbered 00 to 09, so -10 will not exist unless you specify numS32out=11 or more
Greenlee hydraulic punch... http://www.harborfreight.com/cpi/ctaf/displayitem.taf?Itemnumber=96718
hm. how could one 'delay execution of gcode' will a value is in a defined range?
Valen1 is now known as Valen
MarkusBec_away is now known as MarkusBec
Basic Flying Rules: Try to stay in the middle of the air. Do not go near the edges of it. The edges of the air can be recognized by the appearance of ground, buildings, sea, trees and interstellar space. It is much more difficult to fly there.
helicopters fly by beating the air into submission.
alex_joni: Thught you might like this... http://www.youritronics.com/witricity-makes-wireless-electricity-possible/
MarkusBec is now known as MarkusBec_away
if I wrote some software in C/C++, how difficult would it be to 'connect' it to a HAL pin?
would it be easier to just add my code to EMC2 and re-compile
what are you wanting to do?
I want to do some signal processing and then tell EMC2 that the tool has made contact with work...to detect height
sounds like you need to write a realtime hal component
[15:21:28] <BJT-Work> http://www.linuxcnc.org/docview/html//hal_comp.html
ah, excellent. I think you are right
MarkusBec_away is now known as MarkusBec
cradek: Hi, thanks again for your help. I'm still battling the "...does not exist", but making progress. Yes, you were right, I meant s32out-0 (I spec'd 10 in and 10 out, now trying 5 in and 5 out). I can see the W5 counter changing in CL, and can see the s32out-00 existing but not changing in Hal Config. Any suggestions?
what's your assignment expression?
I think it's %W5=0.V
Oops, I hit some kind of Chatzilla color code?
Retry: I think it's % W5 = % C0.V
I added some spaces
if you're wanting to assign to classicladder.0.s32out-05, the expression is %QW5=%C0.V
note %QW5, not %W5
MarkusBec is now known as MarkusBec_away
%W is an internal s32 value, just like %B is an internal bit value
Maybe it is, I'll go to the machine (10 ft away) and check
No, you're right again, 2 for 2. Thanks, I'll edit it and retry. I'll keep you posted. More in a bit.
those % things are obscure and there's no summary of what they are
I find CL to be a very powerful part of HAL but also pretty darn hard to figure out how to use at first
cradek: how is jr? growing up>
skunkworks: ballscrew problems...
other than that, everything is good
MarkusBec_away is now known as MarkusBec
cradek: (Hi skunkworks) Yes, I'm confused by CL's "extra features" too, I was going to ask you where the float ins/outs fit into the scheme, but later, s32out-0 still does not exist. Back to Halconfig?
yes use halconfig or halcmd to see the exact names of the pins that exist
then you will notice that it's spelled s32out-00, not -0
I can't type anything right the first time so I'm constantly exploring with halcmd
like "halcmd show pin classicladder"
I'm not sure about floats - I think you can read/write the integer part of a float with CL. I'm not sure how that all works - I haven't needed it.
cradek: what kind of issue? no lube? or backlash?
skunkworks: the balls are rough and beat-up (I took one of the nuts apart)
I will try to get to the other nut tonight - much harder
the nut has a ballscrew rebuilder's sticker on it
I think they screwed it up
none of the races are full
I'm not sure the big and small balls were alternating - I will watch carefully when I take the other nut apart
well - you are old hat to ballscrews now :)
yeah, I'm not scared of them
hope I can improve it
tomp is now known as tom3p
i installed scite editor because it folds. but it wont print the folded version ( prints the whole file).
i fold to reduce the visual clutter of code, to see the function explanations.
anyone know a folding editor that will print what you see?
what else have you tried?
cradek: I'm not done yet, it appears. Now I have the reverse situation, lol. Now s32-00 exists (you're 3 for 3 on the -0/-00, still just =0 though), but now can't see %QW0 (or %W5) changing. (I replaced %W12 in "Vars" with %QW0, is that valid?) Any advice? How can I get back to seeing the counter(word) change? The counter itself is working OK in CL.
:( snippets for gedit windows is not on the plugin list
cradek: OK, I guess it's working after all, in that I can see it in PyVCP. So I guess I don't have to see it in CL Vars. Thanks again for the help, I really appreciate it.
KimK: I think in Vars you can change one to %QW0 and then see it...?
I thought I had done that, anyway - can't really try it right now without a lot of ladderwriting
EbiDK is now known as EbiDK|AWAY
good evening at all.a question about a component or fuction for control the normal funzionality of a encoder.in emc2 if i move a axis and the encoder count not return the axis is in following error, but if i not command a axis , but the encoder increment cout because the elettronic is fault emc2 have error or not? exist a component for control the funzionality the encoder? thanks
cradek: That's what I tried, I picked %W12 as I thought it unused/unneeded. But it (%QW0) stayed at 0. More next time, must close for now at this location. Much progress was made, thanks again for all your help. Bye for now.
micges: I saw you posted the bug on the tracker. Thanks.
good evening. i have a problem with example in hal manual for passthrough example. i have the problem when write halcmd loadusr passthrough . the error is passthrough", line 10
SyntaxError: Non-ASCII character '\xe2' in file /home/francesco/Scrivania/emc2-2.3.0/scripts/passthrough on line 10, but no encoding declared; see http://www.python.org/peps/pep-0263.html
. i read the info pep but i don't understand it.
line 10 is : h[’out’] = h[’in’]
probably you got "smart" quotes instead of plain ascii quotes if you used copy/paste
just fix the quotes - change them to " or '
cradek, ok thanks i have correct and fuction ok
cradek, excuse for question.exist a component for control the correct fuction of encoder?
or is incorporate in emc2
certain codes have dedicated encoder counting functionality (e.g., mesa cards with the hostmot2 driver), and emc has a component called "encoder" to treat any 2 or 3 general purpose input pins as a 2- or 3-channel encoder, as long as the pulse rate is low enough.
jepler, ok for info. i have see on emc if i meccanical disconnect the encoder on axis, the emc have following error. but i don't prove the move the the encoder when i don't command move the axis.this because some time i have problem on elettronic encoder and the count increment automaticaly when encoder is meccanical stop.thanks for info
it sounds like you might be describing a physical/electrical problem, not a software problem. Improperly shielded or grounded encoder cables can give bogus counts.
jepler, yes i thing the problem is the ground the encoder, tomorrow i ceck it.
you get following error whenever the commanded and feedback position are excessively different
emc cannot detect any error in your wiring other than with this test
cradek: if I understand motioncontrol correctly, he says that his encoder continues to increment even when mechanically stopped
it's based on that understanding that I made my answer
sounds like that will make the axis move
my answer was just that you cannot fix it in software
cradek, yes i thing the problem is hardware , because when the encoder is stop , the conut increase. excuse for my english.
my question is curiosity for software implementation on emc2.
motioncontrol: I seen a similar problem. a vacuum motor cable which is very close to encoder cable, caused this
motioncontrol: emc2 can not detect this kind of problem
the software encoder implementation is src/hal/components/encoder.c and the hostmot2 fpga encoder implementation is src/hal/drivers/mesa-hostmot2/firmware/src/qcountersf.vhd
cradek: it would be interesting if emc tracked the number of impossible encoder state transitions, like 00 -> 11; this could give an indicator of inadequate count rate and/or severe input noise
acemi, tomorrow i ceck the groud the encoder , but the question is for secure maschine implementation.in digital cnc when the encoder not fuction , have the safety integrated system for stop the axis immediately.on the analog system i thing the case is different.
acemi, normaly on analog axis if i turn the encoder and the axis is enable, the axis move fast and stop when the position command is differeze tolleranze at feedback.on digital the axis not move, stop immediately
jepler, the error in count like 00 -> 11 can is select?
jepler, more interesting the code in fpga. if the count rate is no correct , the system stop axis?
jepler, the eror in fpga is :ifcountermode = '0' and (
(quada2 = '0' and quada1 = '1' and quadb2 = '0' and quadb1 = '1') or -- any time both a,b change at same time
(quada2 = '1' and quada1 = '0' and quadb2 = '1' and quadb1 = '0') or -- indicates a quadrature count error
(quada2 = '0' and quada1 = '1' and quadb2 = '1' and quadb1 = '0') or
(quada2 = '1' and quada1 = '0' and quadb2 = '0' and quadb1 = '1')) then
quaderror <= '1';
end if; when quaderror <=1 emc2 stop the axis?
motioncontrol: if you paste more that 3 lines, use www.pastebin.ca please
an paste here link
motioncontrol: Use " / " to separate lines, if there are about five lines in total.
if quada1 != quada2 and quadb1 != quadb2 then
what is it?
What does equal to " != " in programming, by the way?
ilya, yes the question is more interest and i don't have remember the pastebin.excuse
!= means 'not equal'
'!=' is 'not equal'
'==' is 'equal'
acemi, yes i thing it the error , but this error create in fpga generate the stop axis in emc2?
'=' is 'assignment'
acemi, on my maschine i have a hardware problem the axis move for fast for some time, because i have a problem on encoder electronic or ground of it.
OK, heh. Jymm I wanted to ask you if you have ever seen www.ocw.mit.edu--OcwWeb--web--courses--courses/index.htm to arrange that resume using /official names for courses for students/
acemi, and i thing is necessary more small tollerance controll the axis is stop but enable
Their Open CourseWare is awesome. A.W.E.S.O.M.E.O.
I think it's better to solve the encoder problem than to try to catch the problem
acemi, yes tomorrow i see it , but i thing for emc2: the fpga is fast and ceck the encoder , the fpga will send the encoder status pin and stop the axis first the tolleranze position command = feedback.
motioncontrol: you might set the quadrature filter to about twice your highest count rate
this can eliminate a lot of noise. This was discussed (by Leslie Newall sp? and I) on the
EMC users list a couple of months ago
PCW, my curiosity is if the fpga count error stop the axis when true?
The quadrature error bit is currently unused by the driver
PCW, ok in this case emc2 stop the axis when see the tolleranze upper the following error only?
Yes following error, so if you have noise making an encoder channel "creep" the following error should eventually occur
PCW, ok thanks for answers. i thing is important for analog system use the fpga error for stop the axis for abnormal count rate.i have some time before a problem on haidenhain cnc 360 analog system, and when have the problem on encoder the system not move the axis for small time , but have the eoorr: the frequenzy encoder is abnormal.
The default HM2 maximum count rate is quite high, so lowering the encoder filter rate
will possibly fix the encoder noise problem
PCW, now i have a problem on my mascine on encoder and when i enable axis the x axis move for small time
Are these differential interface encoders?
PCW, tomorrow i resolv the problem on encoder, jepler send your idea for groud of it, but my question i thing is important for a cnc system
not true - if noise causes slow creep you will not get following error - the axis simply moves
emc can't guess whether your axis is actually moving - all it has is the encoder count
OK thats right, Encoder count error detection might help there
cradek: Machining centres have encoders at x-, y-, and z-axes almost always, tp track the movements, don't they?
yes it could; do you think noise usually generates invalid quadrature?
ilya: yes of course
In my experience is does because the noise is coupled to both A and B
think of this: noise causes an incorrect count +1, pid corrects and pushes the axis -1, you get a real -1 encoder count. emc sees +1 -1, a very normal event when stationary. no following error. but emc does not think the axis has moved when in fact it has
the axis is now incorrectly positioned at -1 count. you have lost position.
PCW: then it would be great to have that error available to hal
cradek: I mean, unlike the Lathe's spindle, but lathe's x- and z-axis have encoders, to determine the movements, don't they?
ilya: read again what I just typed
this is about noise on the encoder lines causing pid to sense incorrect motion
PCW said this would generate a following error, which is mistaken
instead, unfortunately it causes undetected loss of position
but PCW says there are ways to detect it and it sounds like we could
Also the encder logic filter time constant should be settable via hal
the ability to detect quadrature errors is minimal unless
the filter is set to a reasonable value
PCW: I thought it was (or at least there are a couple choices?)
cradek: I wanted to ask "What the reason of spindle on a lathe to not have encoder if its x- and z-axis have it?" -- but typed and asked I don't know what, sorry.
maybe that was hm4
ilya: lathe spindles do have encoders, for cutting threads, but that is a separate issue
PCW: it strikes me that another thing that would be useful is to check for drift of the index pulse
for gross drift maybe - the edge might reasonably be on a different count depending on direction (not sure)
cradek: but if they have two encoders, the 3rd seems wouldn't cause a high price? :)
it looks like emc2's hostmot driver uses the highest filter (lowest count rate) on encoders by default
cradek, on sinumerik siemens system have on settable pin : ceck index on revolulion .If the encoder have turn a complete revolution and not read the index , stop the axis
There is a per counter choice of 3 counts or 15 counts for the filter but there is a global count rate
generator for the input filters thats not settable via the driver ATM default count rate at 15 count filter
is ~4 MHZ if you dont need this, it make the encoder inputs more noise susceptible than need be
ah, sounds like that would be nice to set.
If you left LatchOnIndex set, you could do a index sanity check every rev
PCW, LatchOnIndex ?
PCW, in firmware code?
Its part of the homing logic (yes in firmware)
PCW, not is possible export this funzionality on pin the emc2?
PCW, or a global pin in hal encoder error ?
Just a driver issue, heck the drive doesnt support the LEDS yet either :-)
PCW: detecting such errors would be very usable
Jymm: Don't know if you're in a funny mood right now, but I've just read "An avocado-tone refrigerator would look good on your resume." -- and want to tell it to you :)
if ony seb had time to do write this
PCW, i don't understand because my spi configuration not fuction.tomorrow i prove with emc2.3.3 , because i now use the 2.3.0, and prove at set the plcin data for write on i/O
The error flag is "sticky" so the driver needs to clear it at startup.
also the way the filters work currently, its possible to miss errors
(the input filters are not interlocked, so the error detection aperture time
depends on the input filter clock, so you still want to lower the filter rate
even with error detection on)
motinocontrol, if you look at the (raw-read/raw-write hack) component you will set that the "PLC" inputs and outputs are not what you think...
PCW, i have the pin plcin and the plcout create of component ispi0 but the p4 connector on 5i20 read and write only gpio
PCW, the component fuction is swith the p4 fuction on spi , but not do it.you thing the componet have error?
Well there were a lot of errors in that component, maybe something is still wrong (ors instead of ands, no command in the SPI write data)
PCW, you have some idea for correct this error?
The component is supposed to initialize the direction registers for the SPI ports, so GPIO should not work normally
once the component is installed
(direction registers and alternate source registers)
PCW, ok i prove at modification the component, and tomorrow prove.thanks for all
I didnt check my changes either so there could be a typo, did you recompile?
PCW, i have installed the ultimate your moificated file, but not fuction.
PCW, i thing the problem is select the spi fuction with the component is run
Maybe someone who understands components better can help. I just fixed the obvious errors
To select the SPI function, you need only set up the I/O port directions and set the alternate source
bits on the I/O pins cooresponding to SPI outputs (thats the 0x777777 written to the DDR and ALtSrc)
PCW, a question, but the .pin file is configuration the pin relative at the firmware select.the pin file is load in fpga or is not used?
(well and setting up the SPI data length, shift rate etc)
the actual I/O is done by the write and reads to the SPI shift register
The pin file is created by a program that reads the FPGA IDROM
You can (and should!) get a similar listing from the HM2 driver by
setting t he proper debug option
MarkusBec is now known as MarkusBec_away
This would verify that you have the proper (Eight servo + six SPI channels on P4)
PCW, how setting the debug option?
hello all I'm new...
PCW, i thing the firmware not load ok, because p3 not is the servo function , but is gpio
PCW, the p2 is servo, p3 and p4 is gpio
Its in the HostMot2 manual
i was guided here by one krs rdk. he says you guys are the masters of EMC2. I come seeking whizdom...
The config I sent had P2 and P3 as servo (8 axis servo configuration)
the SPI will probably not show up since the driver doesn't know it
PCW, i have load your firmware, but on my sistem the p2 is analog, and p3 and p4 fuction equal at svst8_4.bit firmware (p2 servo 4 axis,p3 gpio, p4 gpio) because?
I am retrofitting a Hardinge HNC. Can anyone help me to determine the wisest choice for drive controllers? Mesa products seem to come recommended.
I'm sure pcw could elaborate on them ;)
Mire: maybe start with what you need
ah cradek jeesh im slo sometimes... that must be you. thanksabazillion.
In the svsp8_6_7i46 I sent, p2 and p3 are servo (encoders and pwmgens) and P4 is SPI
svst8_4 would have the same servo I/O on P2 and P3 and stepgens on P4
PCW, on my maschine first i was load the svst8_4.bit firmware. i have on p2 4 axis and the p3 and p4 the i/O.After i load SVSP8_6.bit(spi firmware) , but the p2 is analog(the axis move ok) the p3 and p4 read and write digital io. i don't have servo on p3 and spi on p4.i don't have error in load the firmware.i have rename only the firmware because the lengh is upper the 30 charatets.
OK but in any case, setting the DDR and AltSrc registers should change your GPIO (GPIO inputs will still work but the outputs should not)
PCW, i don't understand : setting the ddr and altscr, how?
The component sets P4s AltSrc (at 0x1208) and P4s DDR (at 0x1108) during the first couple of passes through the servo thread
(at least its supposed to)
PCW, ispi0.0.raw-read-address 4616(0x00001208),ispi0.0.raw-write-address 4360(0x00001108), this is in halmeter pin
HNC Super Precision complete and functional. I'm hoping to use the existing servos, but swap the spindle motor for a single phase VFD. I've worked around controllers, just not *with* them so I mite learn fast but I certainly need help finding my way.
Mire: to be clear, you can keep the same spindle motor, just drive it with a vfd. a vfd directly drives a 3 phase induction motor.
like I said in my email, my HNC uses 5i20 + 7i33T + 2x 7i37T
it is enough IO, but barely. I think I used all the outputs.
before you buy anything for spindle encoder/resolver, see what you have. Mine had both a one channel (!) encoder with index, and a resolver
hah there you are! I just had that light fizzle on, disregard my last email.
the encoder was the old light bulb type - I took both out and mounted a modern encoder
there's no guarantee your lathe has the same stuff in it - you may already have a serviceable encoder on the spindle
bbl, I'm off to further take apart a ballscrew, wish me luck
I shall certainly check. have you found any shortcomings in your choices in hardware?
Okay gang, anybody located near Sacramento?