MESA 7i96+7i76 : How to add 4 PWM and to connect 3 SSERIAL daughterboards ?

More
20 May 2019 20:02 #134396 by nbremond
Hello,

I'am building a versatile CNC+3D printing machine using some MESA boards to control it with LinuxCNC.
I have a 7i96 and a 7i76 connected on its P1 connector.
I also have a
- 7i73 (SSerial) for the pendant controller
- 7i83 (SSerial) for temperature measurement
- 7i87 (SSerial) for analog output

I'll have to add 4 PWM outputs to the 7i96 to control the heaters of the 3D printer. I guess it should be possible to add these PWM output by updating the bit file of the 7i96 FPGA. Is it correct ?

In addition there is only 2 SSerial connections (one on the 7i96, and one on the 7i76 board), and I'd like to connect the 3 SSerial daughterboards I have.
Do you thinks I could connect serveral SSerial daughter board on the same Serial connection ?
Or can I daisy-chain them ?


Thanks a lot for your help.
Best regards.
Bernard

Please Log in or Create an account to join the conversation.

More
20 May 2019 22:14 #134405 by andypugh
For a heater I think that software PWM driving GPIO would work fine.

But have you checked that the existing bitfile has no PWM channels?

(Mesaflash --readhmid would tell you)
The following user(s) said Thank You: nbremond

Please Log in or Create an account to join the conversation.

More
21 May 2019 06:20 #134445 by nbremond
Hello,
Thanks a lot andypugh for your reply. Software PWM is probably a good idea, much simplier. Do you have any link to instructions on how to setup this software PWM in linuxCNC ?

Concerning pre-build bitfiles, I have found a "5 steppers no PWM", and a "4 steppers and one PWM" options. But I need the 5 stepper and the PWM...
Yesterday, I was able successfuly setup the Xilinx FPGA ISE and manage to rebuild (regenerate the bitfile) one of the examples.
I think I'll have to use this tool to build the 7i96+7i76 bitfile I need (I was not able to find it in the prebuild bitfiles).
I'll run the Mesaflash --readhmid tonight.

Your help is very much appreciated.
Thanks
Bernard

Please Log in or Create an account to join the conversation.

More
21 May 2019 06:33 #134448 by pl7i92
as the headers or not time critical
you may stay on software pwm to Gpio pins
that shoudt be fine for you

so no problem on that
The following user(s) said Thank You: nbremond

Please Log in or Create an account to join the conversation.

More
21 May 2019 06:40 #134449 by nbremond
OK. I found the documentation for the software PWM. I think this is it:

www.linuxcnc.org/docs/html/man/man9/pwmgen.9.html

BTW, do you have any idea if I can connect 2 or more SSerial daughterboards on the same RS422/RS485 output of the 7i96 for example ?

Please Log in or Create an account to join the conversation.

More
21 May 2019 10:35 #134462 by andypugh

BTW, do you have any idea if I can connect 2 or more SSerial daughterboards on the same RS422/RS485 output of the 7i96 for example ?


No, it is one sserial board per connector, they don't daisy-chain.

For extra smart-serial you would connect a 7i74 to the expansion header of the 7i96.
Unless you use a bitfile with PWM on that connector, of course.
For a heater I think you could get away with software PWM on smart-serial IO. Heaters are often controlled perfectly adequately with on-off control. I would use PDM rather than PWM in this case. (you get PDM by setting PWM frequency to zero)
The following user(s) said Thank You: nbremond

Please Log in or Create an account to join the conversation.

More
21 May 2019 12:58 #134474 by nbremond
Hello,

To connect a 7i74 to add SSerial ports, I'll have to add a 7i92 (Ethernet FPGA board with 2 DB25 connectors) to my system.
Do you think the linuxCNC driver can manage several ethernet MESA boards ?
Do I ahve to duplicate the following line with a different IP address ?
loadrt hm2_eth board_ip=192.168.1.121

Thanks a lot for the advise to go with PDM for heater control. It make sens !

Please Log in or Create an account to join the conversation.

More
21 May 2019 13:21 #134475 by PCW
Yes, the driver supports up to 4 cards. You need to have 2 separate IP addresses (
10.10.10.10 and 10.10.10.11 would be good choices )

You also need to use the read-request function to avoid stacking the read functions
Ethernet response times, I think I have an example hal file with 4 devices i can post here later.

Unfortunately, when you have so much I/O it probably would have been better to start with a 7I76E or 7I80DB

Note that if you make your own bitfile for a 7I96, be careful the first time you write it
because a mistake can brick the card (requiring a JTAG restore)

One safe way to try new bitfiles is to write them to the fallback area:

mesaflash --device 7i96 --write my-new-bitfile.bit --fallback

and then reload the FPGA from the fallback area:

mesaflash --device 7i96 -- reload --fallback

Then if your new bitfile fails to work for some reason, you can recover by a power cycle
The following user(s) said Thank You: nbremond

Please Log in or Create an account to join the conversation.

More
21 May 2019 13:52 #134479 by andypugh
Could one of the step/dir channels be re-purposed as smart-serial, with a custom bitfile?

Please Log in or Create an account to join the conversation.

More
21 May 2019 14:02 #134480 by PCW
Yes, you could add up to 3 sserial channels to a 7I96 by using
differential step/dir outputs for RS-422 TX and differential encoder inputs
for RS-422 RX.

(with quite screwy wiring)

Please Log in or Create an account to join the conversation.

Time to create page: 0.101 seconds
Powered by Kunena Forum