Mesa 7i96 Ethernet board

More
10 Jul 2017 12:38 - 10 Jul 2017 12:47 #95596 by microsprintbuilder
I stared making a table to do this. It appears I can only do 3 outputs as the number of weighted outs is limited to 8 and I have 7 just to do out 1,2,3. Unless I'm doing it wrong as I've never done this. I only need the one output so I'm good. I was just hopping to contribute a work around until you smart guys come up with a permanent solution.
Last edit: 10 Jul 2017 12:47 by microsprintbuilder.

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

More
10 Jul 2017 13:48 - 10 Jul 2017 15:27 #95600 by PCW
Replied by PCW on topic Mesa 7i96 Ethernet board
(edit: it looks like weighed sums output is signed so we need to add a type conversion_

You only need 1 weighted_sum component

A single weighted_sum component can have up to 16 input bits and you only need 6:

loadrt weighted_sum wsum_sizes=6
loadrt conv_s32_u32
addf process_wsums servo-thread
addf conv-s32-u32.0 servo-thread

net out0 wsum.0.bit.0.in <= what_drives_out0
net out1 wsum.0.bit.1.in <= what_drives_out1
net out2 wsum.0.bit.2.in <= what_drives_out2
net out3 wsum.0.bit.3.in <= what_drives_out3
net out4 wsum.0.bit.4.in <= what_drives_out4
net out5 wsum.0.bit.5.in <= what_drives_out5
net outputs-s wsum.0.sum conv-s32-u32.0.in
net outputs-u conv-s32-u32.0.out hm2_7i96.0.raw.write_data

setp hm2_7i96.0.raw.write_strobe true
Last edit: 10 Jul 2017 15:27 by PCW.

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

More
10 Jul 2017 20:15 - 10 Jul 2017 20:19 #95621 by microsprintbuilder
so I think I finally understand this. LOL after I wrote and ran each data number and grafted it. I have connected machine on to 0 and spindle on to 1. and commented out the rest. the sum number is correct. but I now cannot run the 7i96setup while axis is on. It says ( pin 'hm2_7i96.0.raw.write_data' is connected to a signal ) I understand that is, but how do I get around it? I also have it as a M100 and tried running it that way but no luck.
Attachments:
Last edit: 10 Jul 2017 20:19 by microsprintbuilder.

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

More
11 Jul 2017 13:31 #95658 by PCW
Replied by PCW on topic Mesa 7i96 Ethernet board
You would need to add the net command that connects hm2_7i96.0.raw.write_data
to the end of the setup command and remove it from the hal file

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

More
13 Jul 2017 07:58 #95751 by Zacharius
Replied by Zacharius on topic Mesa 7i96 Ethernet board
Hi guys,

i have another question.
is it possible to marry mine 7i96 with pendant control card 7i73 via RS-422 existing on 7i96?
assuming that answer is yes, however have no idea how to configure it in hal.
if no, which one will be suitable for that?
i'm planning to make pendant control for my machine so even simple one would be cool, but really like 7i73 abilities.

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

More
13 Jul 2017 13:00 #95756 by andypugh
Replied by andypugh on topic Mesa 7i96 Ethernet board
Yes, you should be able to plug a 7i73 straight in. From that point on the HAL config for the 7i73 will look exactly like for any other 7i73 installation.

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

More
13 Jul 2017 13:50 #95757 by Zacharius
Replied by Zacharius on topic Mesa 7i96 Ethernet board
cool, thank you.
just placed an order for 7i73 in Mesa store :)

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

More
18 Jul 2017 18:08 #96014 by microsprintbuilder
I was wondering if maybe I could create a if else statement to run the script in a tcl. file. I created one but keep getting an error (variable out_fix not found)

This what I have in the file;

newsig out_fix bit


if {($out_fix) ==(0)} {
setp hm2_7i96.0.raw.write_address 0x7e00
setp hm2_7i96.0.raw.write_data 0x0
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x7d00
setp hm2_7i96.0.raw.write_data 0x0
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x1100
setp hm2_7i96.0.raw.write_data 0x1f800
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x1200
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x1104
setp hm2_7i96.0.raw.write_data 0x103ff
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x1204
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x1104
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x7e00
setp hm2_7i96.0.raw.write_data 0x1030
setp hm2_7i96.0.raw.write_strobe true
setp hm2_7i96.0.raw.write_address 0x7d00
sets out_fix 1
} else {
net outputs-u conv-s32-u32.0.out hm2_7i96.0.raw.write_data
setp hm2_7i96.0.raw.write_strobe true
}

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

More
19 Jul 2017 15:52 - 19 Jul 2017 15:53 #96082 by andypugh
Replied by andypugh on topic Mesa 7i96 Ethernet board
I think a complication here is that the data and strobes are only sent once every mS in the servo thread.

The answer might be a custom HAL component like this (untested)
component raw_writer "Example for 7i96 AC outputs";

pin in bit in[6] "The input data to be written"
pin out unsigned address "Connect to raw.write_address";
pin out unsigned data "Connect to raw.write_data";
pin out bit strobe "Connect to raw.write_strobe";

param r state=0 "State machine state";

function _;

;;

FUNCTION(_){
switch (state){
case 0: // begin init
    address = 0x7e00;
    data = 0x1030; //enable AC out, set frequency to 2 MHz
    strobe =  true;
    state = 1;
    break;
case 1:
    strobe = 0;
    state = 2;
    break;
case 2:
    address = 0x1100;
    data = 0x1f800;
    strobe = 1;
    state = 3;
   break;
case 3:
    strobe = 0;
    state = 4;
    break;
case 4:
    address = 0x1200;
    data = 0x1f800;
    strobe = 1;
    state = 5;
   break;
case 5:
    strobe = 0;
    state = 6;
    break;
case 6:
	address = 0x1104;
	data = 0x103ff;
	strobe = 1;
	state = 7;
	break;
case 7
    strobe = 0;
    state = 8;
    break;
case 8:
	address = 0x1204;
	data = 0x103ff;
	strobe = 1;
	state = 9;
	break;
case 9
    strobe = 0;
    state = 10;
    break;
case 10: // setup copmplete, now cycle between last two states to write data
	address = 0x7d00;
	data = in(0) + in(1)<<1 + in(2)<<2 + in(3)<<3 + in(4)<<4 + in(5)<<5;
	strobe = 1;
	state = 20;
	break;
case 20:
	strobe = 0;
	state = 10;
	break;
}
}
Last edit: 19 Jul 2017 15:53 by andypugh.

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

More
19 Jul 2017 16:05 #96087 by PCW
Replied by PCW on topic Mesa 7i96 Ethernet board
The script does work
I did find that i needed to continue to generate edges on the write strobe
I used a siggen at 500 Hz for this

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

Moderators: PCWjmelson
Time to create page: 0.171 seconds
Powered by Kunena Forum