Mesa 7i96 Ethernet board

More
19 Jul 2017 16:08 #96088 by andypugh
Replied by andypugh 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


Running from a file, or typed at the command line?

The HAL component ought to be more convenient.

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

More
19 Jul 2017 16:13 - 19 Jul 2017 16:15 #96089 by PCW
Replied by PCW on topic Mesa 7i96 Ethernet board
A one time setup running from a file
the net connections of write strobe to clock
and output data source to raw write data done at the end of the setup file

(I expected setp raw_write_strobe to work each cycle because the strobe is cleared but it does not)
Last edit: 19 Jul 2017 16:15 by PCW.

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

More
20 Jul 2017 03:34 #96120 by microsprintbuilder
I've never compiled anything so I'm not sure what I'm doing wrong. see anything obvious? I'm using linuxcnc-uspace-dev. It appears that it compiled but not to the right location.
Attachments:

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

More
20 Jul 2017 08:47 #96127 by andypugh
Replied by andypugh on topic Mesa 7i96 Ethernet board
No, that's a failed compile. (I wrote that .comp in my break at work some miles from any LinuxCNC machine).
The error is mine, there needs to be a ";" at the end of the line that starts "pin in bin in[6]...."
(Compiler error messages often turn up a few lines later, and sometimes a few files later, at the point where the compiler really can't make sense of it any more)

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

More
20 Jul 2017 13:13 #96140 by microsprintbuilder
I have found that if i try to compile just in my file i get the errors. I have been able to correct a few but now I've hit one i cannot. I googled this error and have not found a solution.



this is what I have so far

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 bit state=0 "State machine state";

function _;
license "GPL";
;;

FUNCTION(_){
switch (state){
case 0: // begin init
address = 0x7e00;
data = 0x1030; //enable AC out, set frequency to 2 MHz
strobe = 1;
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;
}
}
Attachments:

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

More
20 Jul 2017 13:25 #96143 by andypugh
Replied by andypugh on topic Mesa 7i96 Ethernet board
My fault again. Sorry

param r bit state=0 "State machine state";

Needs to be

param r unsigned state=0 "State machine state";

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

More
20 Jul 2017 17:01 #96152 by microsprintbuilder
I did get it to run but the board is not responding. I'm running this on my laptop. It has latency problems could that be the problem? The computer I'm going to run it on is pieces as I am installing it on the machine

Attachments:

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

More
20 Jul 2017 17:15 #96153 by andypugh
Replied by andypugh on topic Mesa 7i96 Ethernet board
If you check in Halscope do you see the strobe pin toggling?
Does the data pin show changing values?
Is the address pin correct?
Have you actually connected the pins in HAL?

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

More
20 Jul 2017 17:25 #96154 by microsprintbuilder
I have connected the pins to the board. as you can see in the show hal screenshot the address is the same in the comp and board..I can watch it changing from state 10 to 20. and I can also see the strobe go on and off. I'll check the halscope and get back to you.

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

More
20 Jul 2017 18:40 - 20 Jul 2017 19:08 #96161 by microsprintbuilder
strobe doesnt seem to be strobing. I got nothing on the scope. I added the encoder for the thc to see something moving. I've attaced my hal files for you to look at.

File Attachment:

File Name: PLASMA-4X4...7-20.hal
File Size:9 KB

File Attachment:

File Name: postgui.hal
File Size:2 KB
Attachments:
Last edit: 20 Jul 2017 19:08 by microsprintbuilder.

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

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