there are three mesa example configs
actually there are more than three
there are three directories of mesa examples
and the second is, that when i see the pins connected to the signals for the axis, i see that they are DAC pins, i was wondering if this pins are really DAC outputs, or if they are only digital out pins for connect them to the 7i33
hm2-servo uses hostmot2, and has several examples for several boards
hm2-stepper uses hostmot2 and has several examples for several boards
m5i20 does NOT use hostmot2
it uses the old (pre-hostmot2) firmware
actually I may be leading you astray
I'm looking at the files on the CVS server, which are the most recent
I think the hm2-servo and hm2-stepper configs aren't in the 2.2 release
I'm not telling you anything that you can't find by browsing around on your own system
(and if you do that, you will know it applies to the version you have)
re: the 2nd question
the 5i20 and similar boards don't have actual hardware DACs
sorry, but i was confused about that FPGA thing, i red in the mesanet page that the fpga config has to be loaded into the board before doing anything
they generate a pwm signal, then filter and amplify it (on the 7i33) into a +/-10V signal
yes, a config needs to be loaded
but when i load the m5i20 example
sorry, I should speak more precisely
a firmware needs to be loaded
and the sample config probably does that
i understand you
excelent i was thinking that but i wasn't sure
and the fpga config stays on the board once i loaded the m5i20 config?
yes, once the firmware is loaded it remains till replaced by something else
or the config is loaded everytime the emc2 starts
I believe the hal_m5i20 driver loads the config every time it starts
and that thing about the DAC outputs.. is only the name, i mean.. i can use that outputs for make steps or pwm or anything that i want right?
yes and no
is there any risk ?
you can literally do just about anything with the FPGA, _if_ you write the FPGA firmware (VHDL) and the associated driver code
if you are using the standard firmware and driver, you can do whatever that firmware and driver provides
which I don't have memorized - that is why we have a manual
right.. so i have to write my own fpga configuration if i want to change that outputs
i need to build my own kernel module too right?
why are you asking this?
writing fpga firmware is NOT a simple thing to do
and normally, the people who know how to do that wouldn't be asking this kind of question
no, i don't know how to do it, i'm new on this
typical users shouldn't have to mess with the fpga firmware
that's why i'm in this irc
if you don't already know VHDL, or have a burning desire to spend weeks learning electrical engineering and digital logic stuff, forget about custom FPGA firmware
my brother is who knows this... i'm just learning but he had programed several things with microcontroler and he has built his own pcb control board, but he doesn't know english so i'm here
your questions are too general
i'm not an expert i'm learning
can your brother read either english or french?
english yes he can read a little
he should be reading the manual
the m5i20 manual?
the EMC2 manual
yes we read it but we didn't find about creating our fpga configuration
thats because creating your own FPGA configuration is _VERY_ advanced
you need the xilinx FPGA development tools (about a 2 gigabyte download), and you need to know VHDL
you should NOT be doing that
but why do you say that?
why do you want to make your own FPGA configuration?
i want to learn i'm not doing anything without learning
there are limits to everything
well, i need to change for example the encoder inputs..
you could make a car by starting with an engine, or you could start with a lump of iron and make the engine
writing your own FPGA configuration is like starting with a lump of iron
you can do anything you want (5-cylinder engine ;-) but it will take a long time and a lot of learning
we have camshaft factory so i know about iron machining
and i have the interest in learning
about this, that is why i'm asking
do you know what VHDL is?
because i know here are people who knows a lot
VHDL = V(something) Hardware Description Language
it is the language used to define the FPGA
the FPGA source for the standard m5i20 configuration is in CVS
right, it comes with emc2 source? or separate?
if you want to modify it, you need to download the tools, download the source, learn enough VHDL to modify the source, then build the firmware using the xilinx tools
thanks, but if i use the hostmot 2
except that hostmot2 is easier to modify
and we have several different configurations of hostmot already made
well what i was planning is to modify the hostmot 2 with the inputs and outputs that i need
oh, i didn't know that
[00:23:50] <jmkasunich> http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/drivers/mesa-hostmot2/
click on firmware, then 5i20
that will get you to here:
[00:24:17] <jmkasunich> http://cvs.linuxcnc.org/cgi-bin/cvsweb.cgi/emc2/src/hal/drivers/mesa-hostmot2/firmware/5i20/
4 different bitfiles
SV12 = 12 servo axes - 12 x DAC + 12 x encoder counter
SVST2_8 = 2 servo axes and 8 stepper axes
thank you very much
and i have to read it again but, if i'm not wrong in the console you can load the fpga config into the board ?
if you look in the .PIN files you'll see the pinouts that are available
for hostmot2, you tell the driver what firmware to load
that!, sorry for the confusion, so
what i need to do is not to write an fpga config
i need to write a firmware
those two will explain how to specify which firmware you want
thanks, so what i need to do is not that impossible right? i mean to configure my own firmware
I still don't know why you want to write your own firmware
you are making things very very much harder for yourself
but how can i change the encoder inputs
to general inputs
any encoders that you are not using automatically become general purpose I/O
the same is true with any DAC or stepgens that you are not using
read "man hostmot2" and "man hm2_pci"
thanks you, is that in the emc2 manuals?
"man" is the unix/linux man page command
just type "man hostmot2" at the command line prompt
thanks again, sorry for all the trouble but i'm new on linux, and it's difficult to write so fast in english
you are doing fine with the english
I didn't know it wasn't your first language until you told me
thanks, but if you could understand spanish this would be easier :)
or if my english would be better
because the 80% of the confusion on this conversation is because i'm not used to speak in english
it looks like the pdf integrators manual doesn't say much about hostmot2, it mostly talks about the older m5i20 firmware and driver
but nevermind, so all the Inputs and Outputs of the card are GPIO
but when i write the hal for my config... i assign the function for every input and output of the card?
when you invoke the hostmot or hm2_pci driver, you give it things like "num_encoders=1"
i remember, i red about that
if the firmware has 8 encoders, but you say "num_encoders=1", then 1 will be an encoder and the other 7 will be GPIO
and what's the difference in the two hostmot drivers?
you use both
i have to invoke one after the other ?
hostmot2 is the generic driver for all hostmot2 stuff, it makes the HAL pins and does most of the realtime work
hm2_pci is the specific driver for the PCI based cards - 5i20, 5i22, 5i23, etc
it loads the firmware and handles communication between hostmot2 and the board
so the hal_m5i20 it's useless for me?
because it has the config already in
hal_m5i20 is an older driver that works with an older firmware
there is only one firmware that works with that driver
well i will try tomorrow (here is the 22:37)
where are you? Brasil?
and you ?
wow, my geography is really bad
hahah don't worry
middle of the USA - 19:37 here
I thought Argentina was a little west of me, not 3 hours east
well now i think is 2 hours because
since 2 years ago the goverment started with summer time change
I guess South America isn't exactly straight south from North America, but quite a bit east too
we will have that change next week
i don't know when we have to change it yet :)
you are changing from summer to winter :-( we will be changing from winter to summer ;-)
but almost any clock that i use (cellphone, pc ) changes the hour automatically so i don't matter
hahaha, well i'm a little bit tired about this summer, it was very hot
and working in the factory with that temperature is like hell
summer here is only medium hot
winter is very cold
you are so lucky
here in buenos aires this summer we had 42º C
and in the north of our country the temperature reached the 50º C
here, average summer is probably 30-35C
38C would be rare - maybe 1 day every year or two
and in the winter you have snow for sure
40C very rare
i love it
in January we had about 1meter total
not all at once fortunately
but I had 1/2 meter on the ground at one time
that's very much
here it's very rare the snow here in my city
-7C average temperature for January, -24 minimum
but 2 year ago falled snow
it isn't usually that bad, usually -15C or so is the lowest
here in the winter we have minimun of -3 or -5 but not less than
that is about what it is today
but it's very rare, most days we have 2ºc or 3ºc in the winter
well i hope soon i can make the machine work with the mesa board :) you've been very helpful with me
[00:47:27] <jmkasunich> http://en.wikipedia.org/wiki/Cleveland,_Ohio#Climate
heh, wikipedia knows more about my weather than I do
the picture is nice :), i hate buenos aires, i would like to live in mendoza is in Los Andes
where the plane of the ALIVE film crashed
the film and the real plane
mountains are nice
yes, i love it.. i hate my city because is full
as long as you aren't in a plan crash
you can't even walk in some places
13 million population - that is big
here in bs as ?
i think that's the entire Province
wow, my geography is _really_ bad
but yes, it's a madness
that's why this country is so bad
I had argentina and chile mixed up
but here in the capital city, there like 8 million people
i'm next to the capital, but very near, about 15 blocks
and i don't know what's going to happen this year with the situation, because every day gets worst
yes, it is bad everywhere
yes, but here we're used :)
every 10 years we have a economical trouble
but, you have to live here to know, the matter is that here the most of the people wants to have everything without work
fortunately there people that make things work, but it's hard because the laws and the goverment seems to support the people that doesn't work
it's always the same.. the power
the need people who don't think to stay in the power as long as they can
strange - shortage of coins?
what is the shortage
i don't know that word
[00:58:04] <jmkasunich> http://en.wikipedia.org/wiki/Buenos_Aries#Buses_-_Electronic_Ticketing
short (short) age (old)
coins? metal money
let me see
oh, shortage = not having enough
yes, because for some reason, people was keeping the coins for selling a package with i don't know 100 $ of coins, but the sold to you in the 120$
the metal in the coins is worth more than the face value
that happened a little bit here in the 1970s I think
our pennies ( one cent coin) used to be made of copper
the copper was worth 2 or 3 cents
haha, that's ironic
now pennies are made of zinc and plated with a tiny amount of copper
but yes, it happens all around the world
i don't know what metal are our coins made from
our larger coins (10 and 25 cents) were made of silver 50+ years ago, but that changed long ago
in the future we will have our credit card number in our fingertip :)
heh - Buenos Aries: 13680 persons/km^2 Cleveland: 2380 persons/km^2
I guess it is crowded there
haha i told you, you're lucky
it says the suburbs of Buenos Aries are about 2400/km^2
but fortunately i live in a kind of suburb... the capital is very near but here is not that extreme situation
but yes, the capital is like hell, is like tokio in some places
the best places to live here is near the mountain :)
wikipedia doesn't know population density in Mendoza
but only 110993 people, must be better than BA
yes, a lot better
i was there and it's wonderful
ah, area = 54km^2, so density is about 2000/km^2
and also the cities are cleaner than here
mendoza is like another country
here is a mountain city that I visited once - it was very nice: http://en.wikipedia.org/wiki/Flagstaff,_Arizon
nice place :)
there in usa are very nice places to meet
i hope someday i can go and visit there
hmm, my UPS is beeping at me
it has been good talking to you - good luck with your project
I must get busy on my project now
thank you it has been good for me too :)
good luck with that
we'll talk later :)
now where did I put my hole-mover?
jmkasunich: In the last home you moved
I'd like to apply a clue-bat to the person who made this thing I'm trying to fix
a test fixture
it's a copy of something that I made - the buyer bought one from me, then wanted more and had copies made by a local shop
calling the local shop a bunch of amateurs is an insult to amateur machinists everywhere
holes drilled in the wrong places, stuff shimmed to make up for being cut wrong
and why didn't he just come back to you in the first place
either I wanted too much money, or too much time, dunno which
or it might have been while I was in the middle of getting divorced, and simply wasn't accepting any jobs
ah gotcha. Wasn't aware of the divorce, sorry (or congrats) on that (as it applies).
bit of both I think
Yeah, divorce is just kinda one of those things... heartbreaking, ballbreaking, or both
[#emc] "This is the #emc channel - talk related to the Enhanced Machine Controller and general machining. Website: http://www.linuxcnc.org/,
wiki at http://wiki.linuxcnc.org/"
np, thanks for letting me know it's not working
archivist_attic: filled the house up?
started archiving in the attic?
at the Magic Attic
where I disappear Mondays and Thurdays http://www.magicattic.org.uk/
hello everybody, i bought a mesa 5i20 interface and i was wondering if i need to load the fpga driver with the command hm2_pci everytime that i execute the config of the machine?
what version of EMC are you using
I'm guessing that you would need the hm2_5i20 I have a 5i20 but it is on 2.3 beta
[21:26:15] <BJT-Work> http://www.linuxcnc.org/docview/html//man/man9/hostmot2.9.html
so i load first the hostmot2 module with the fpga config and then i load the m5i20 module?
I think so... there should be a sample config to look at with your install
gotta go now
have a nice day
[21:32:05] <skunkworks> http://imagebin.ca/img/zF4TSFr.jpg
leito14: yes, you need to load it every time you use it
leito14: there is no persistent memory on the board to hold the fpga data, so on every load it gets loaded
thank you very much, that was what i need to know :)
leito14: the correct order is to load hostmot2, then hm2_pci with the link to the proper firmware
leito14: it would be very appreciated if you can read http://www.linuxcnc.org/docview/devel/html//drivers_hostmot2.html
excelent, i will read it now
and also comment if something can be made more clear
or if something is not easy to understand for someone who doesn't know how it's supposed to work
alright, i'll tell you if i find something difficult to understand
[21:34:55] <skunkworks> http://imagebin.ca/img/mngnnRy1.jpg
skunkworks: your pic?
yes - stitched togather
everything seems clear for me :)
leito14: ok.. well if you still have questions.. we're around
skunkworks: a bit gray for my taste (the scenery.. not the pics)
but looks very nice :)
one of these days I need to get a real camera
I did nothing to the pictures
panoramas are fun
yes - first time I have played with it. :)
[Global Notice] Hi all. A couple of our hubs lost connectivity for a minute or so there resulting in a rather large and noising split. We have worked around the issue for now and are hopeful things will now settle down. Sorry for the inconvenience and thank you for using freenode!
seb_kuzminsky: Are you around right now?
So I have made a list of what code I need to write for SPI in HM2 here: http://wiki.linuxcnc.org/cgi-bin/emcinfo.pl?SPI_Sub-Driver_For_Hostmot2
I was wondering if you could let me know if I'm missing anything.
Just the last section labeled "Code TODO"
there's no prepare_tram_read or process_tram_write
It seams there would need to be?
you prepare a buffer to write to the tram, but you get nothing back so there's nothing to process afterwards
the processing happens after you read the tram, hence process_tram_read
I can see that one. But wouldn't we need a prepare_tram_read?
similarly, there's nothing to prepare for when reading from the tram, you just process what you read afterwards
perhaps you want to change what you are sending? (during initialization)
reading from the tram doesnt involve sending anything ;-)
that's writing to the tram ;-)
and for that, yes, you do perpare what you want to write
But we do need to send a data to the SPI buffer if we expect to get anything back right?
i dont know how that work
does the hm2 bspi do the read-while-writing thing? i think i read about that while i was skimming some spi docs
but i didnt read it very carefully :-/
Yes it does.
in that case maybe tram-read/tram-write isn't a very good abstraction for bspi
you're free to do whatever you think would be appropriate in hm2_read() and hm2_write(), it doesnt have to be tram-ish
so where can I get some information on translation ram?
regmap is about all there is afaik
but note that the hm2 driver doesnt *actually* use the tram yet
thats what I thought.
it's setting itself up for using it but then faking the tram access with normal i/o
tram is on my todo list but i haven't gotten to it yet :-(
it mostly would benefit the 7i43, not so much the PCI boards
Well so I have been thinking the communication between EMC and the mesa board (for SPI) is split up into four phases.
One phase (phase A) to send to the write buffer during hm2_read, one phase (phase B) for getting the results from the buffer durring hm2_read.
phase B, not phase :)
phase C writes to the buffer durring hm2_write, and phase D reads the buffer durring hm2_write.
so no, that doesn't really fit into the tram idea i suppose.
i haven't really studied bspi so i'm not sure what the best way to drive it would be
you probably know better than i do
that doesn't seam to be likely :)
geo: Yes you always have to send something to receive with SPI...
and all 32 bit, right?
PCW: with bspi, do you define a channel descriptor for each slave?
In the simplest case the SPI slave (BSPI is the master) is nothing but a shift register
Yes, a descriptor for each slave device
then you put a bunch of entries in the bspi fifo, where each entry consists of a channel descriptor index and the data to send to the slave for that fifo entry?
Yes though the index is encoded in the write address
isn't it really one descriptor for each SPI frame you send? So if you have a 4 channel ADC, you need 4 descriptors?
No, the descriptor would just be setup for the ADC hardware channel particulars (number of bits etc)
for the AD5754, do you send it four 16-bit frames, with each frame going to a different DAC channel?
PCW: So I missed the boat here, how do you send multiple "frames" to one device?
Seb: For AD5754 channel is embedded in data, so I have 2 descriptors for DACs on 7I65
Geo: Just write them to send FIFO (at proper address so correct descriptor is chosen)
Seb yes four frames so for updating all channels on a 7I65 I write 4 frames to one address (for one chip) and frames to another address (for the other chip)
PCW: the channel descriptor for each 5754 chip has 24 bits/frame?