7i77 Mode 3 coding in HAL file

More
13 Jul 2022 03:53 #247210 by Thods1222
Hello, 
I am trying to understand how to code the HAL file to allow for the 7i77 to be in Mode 3 to do encoder inputs on Pin 16 etc. My setup is ran through a 7I92H which runs to the 7i77 and the 7i74 through the headers. The 7I74 runs 7I70 and 7I71 for the respective inputs and outputs for the mill.  I feel like my wires are hooked up correctly to the pins. The ground is common to the field ground but it doesn't recognize the pendant A/B phases. I can see the axis select enable through Hal config as well as the increments select.  What setting do I need to have in the HAL file to make this convert to mode 3?  I think I have mine set up with 0=300xxx, which should get me mode 3 in my card correct? Do I need to run mesaflash to get it to change?

Also, can someone give me a tutorial on what the numbers/X's mean in their respective locations in the smart serial format?

Thanks for the help in advance, it is much appreciated. 

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

More
13 Jul 2022 04:46 #247212 by arvidb

Also, can someone give me a tutorial on what the numbers/X's mean in their respective locations in the smart serial format?

The config modparam is described here . Search for "sserial_port_N".

The Mesa FPGA cards support four SSerial "ports", where each port can handle up to eight SSerial "channels". N in sserial_port_N denotes port, and the string of numbers and x's sets the mode for each of the channels in that port; x means disabled. So "sserial_port_0=300xxx" would configure the six first channels of port 0 to modes 3, 0, 0, and channel 3-5 disabled. What the actual mode numbers mean depends on the type of Sserial device connected.

The channel layout depends on the specific firmware used.
You can determine the channel layout by using mesaflash's --readhmid function


The meaning of the 7i77's different modes are described in the 7i77 manual under "SOFTWARE PROCESS DATA MODES". Although that section doesn't mention which channel to the apply the mode to.
The following user(s) said Thank You: Thods1222

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

More
13 Jul 2022 16:14 - 13 Jul 2022 16:15 #247239 by PCW
Replied by PCW on topic 7i77 Mode 3 coding in HAL file
port_0=300xxx should be correct for standard 7I77 firmware

Note that likely you cannot read the A/B lines as individual inputs with 5V signals
(the digital inputs still have a ~ 1/2 field voltage threshold) but should be able to
read the MPG encoder counts on these pins:

hm2_7i92.0.7i77.0.0.enc0
hm2_7i92.0.7i77.0.0.enc1
Last edit: 13 Jul 2022 16:15 by PCW.
The following user(s) said Thank You: Thods1222

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

More
21 Dec 2022 21:59 - 21 Dec 2022 22:04 #260040 by turbostew
I am also having issues with this 7i92-7i77. I do not see the hm2_7i92.0.7i77.0.0.enc0/hm2_7i92.0.7i77.0.0.enc1 signals in mode 3. I see no difference in halcmd show between "port_0=000xxx" and "port_0=200xxx and port_0=300xxx.

I enabled like this:
loadrt hm2_eth board_ip="10.10.10.10" config=" num_encoders=6 num_pwmgens=0 num_stepgens=0 sserial_port_0=300xxx"

I loaded most recent 7i92_7i77x2.bit into 7i92.

BTW, what is "7i92_7i77x1pktd.bit" for?

Ideas?????
Last edit: 21 Dec 2022 22:04 by turbostew.

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

More
21 Dec 2022 22:15 #260043 by PCW
Replied by PCW on topic 7i77 Mode 3 coding in HAL file
Some parsing error/ bad chars in the config string?

7i92_7i77x1pktd.bit has a PacketUART rather than a sserial port
on the 7I77s RS-485 port

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

More
21 Dec 2022 22:52 - 21 Dec 2022 22:55 #260046 by turbostew
  I scrubbed text pretty well and no change. I only have power connected through the cable from 7i92, no other power connected. I have 2 yellow leds lit on 7i77.
Attachments:
Last edit: 21 Dec 2022 22:55 by turbostew.

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

More
21 Dec 2022 22:57 #260047 by tommylight
7i77 must have Field Power for it to work and show field inputs/outputs, MPG encoders and analog inputs are part of this.
Axis encoders work without field power.
The following user(s) said Thank You: turbostew

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

More
21 Dec 2022 23:47 - 21 Dec 2022 23:49 #260051 by PCW
Replied by PCW on topic 7i77 Mode 3 coding in HAL file
Yep, only the analog side is working because there's no field power
With field power, you should get something like this on startup:

 

File Attachment:

File Name: field.txt
File Size:1 KB
Attachments:
Last edit: 21 Dec 2022 23:49 by PCW.

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

More
21 Dec 2022 23:47 #260052 by turbostew
Thanks Peter! All is right with the world now....

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

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