Mesa 7i96s --pktUART

More
07 Oct 2024 12:04 #311482 by nartburg
Mesa 7i96s --pktUART was created by nartburg
I'm trying to get a modbus connection to my VFD
so using
.bin -->7i96sd_pktv2.bin

and using the connection

7I96s TB2
15 GND  --> 330 Ohm --> RX+ 
16 RX+  --> TX+
17 RX-   -->  TX-
18 TX+
19 TX-
20 5V  --> 330 Ohm --> RX-

and using an adaption of the script found in
linuxcnc.org/docs/2.9/html/drivers/mesa_modbus.html#! /bin/bash

# First setup the DDR and Alt Source regs for the 7I96
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x1100=0x1F800
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x1104=0x1C3FF
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x1200=0x1F800
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x1204=0x1C3FF
# Next set the baud rate DDS's for 9600 baud
mesaflash --device ethernet i96 --addr 10.10.10.10 --wpo 0x6300=0x65
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6700=0x65
# setup the TX and RX mode registers
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6400=0x00000A20
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6800=0x3FC0140C
# Reset the TX and RX UARTS
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6400=0x80010000
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6800=0x80010000
# load two 8-byte modbus commands:
# 01 05 00 00 5A 00 F7 6A and 01 01 00 00 00 01 FD CA
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6100=0x00000501
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6100=0x6AF7005A
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6100=0x00000101
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6100=0xCAFD0100

# Command the TX UART to send the two 8 byte packets
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6200=0x08
mesaflash --device ethernet --addr 10.10.10.10 --wpo 0x6200=0x08
sleep 1
# display TX Mode
mesaflash --device ethernet --addr 10.10.10.10 --rpo 0x6400
# display the RX mode reg, RX count, and the data
mesaflash --device ethernet --addr 10.10.10.10 --rpo 0x6800
mesaflash --device ethernet --addr 10.10.10.10 --rpo 0x6600
mesaflash --device ethernet --addr 10.10.10.10 --rpo 0x6500
mesaflash --device ethernet --addr 10.10.10.10 --rpo 0x6500I get a nice signal between Tx+Rx+ and Tx-/Rx-

for test purposes before implementing the driver for the vfd I use

.mod --> relayboard.mod at debug 3

and load it with:

loadrt relayboard ports=h22_7i96s.0.pktuart.0
addf relayboard.00 servo-thread
setp relayboard.00.baudrate 9600
setp relayboard.00.address 1
setp relayboard.00.update-hz 2

after starting linuxcnc:

nothing on the bus

WAIT_FOR_DATA_FRAME - rxmode = 16200F8E

 1002 TIMEOUT_RESET 3
WAIT_FOR_DATA_FRAME - rxmode = 16200F8E
START txstatus = 00001460 rxstatus = 16200F8E
WAIT_FOR_DATA_FRAME - rxstatus = 16200F8E
.
.
.
pls advice
Martin

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

More
07 Oct 2024 15:19 #311498 by PCW
Replied by PCW on topic Mesa 7i96s --pktUART
I can try to duplicate on Tuesday
Note that the default timeout is 1 second
so you will only get a short Xmit once per
second if there is no device to answer
so its easy to miss.

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

More
07 Oct 2024 16:39 #311504 by nartburg
Replied by nartburg on topic Mesa 7i96s --pktUART
at 100ms/div and a width of 1.5s even a short Xmit can be cought ;-))

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

More
07 Oct 2024 16:58 #311505 by PCW
Replied by PCW on topic Mesa 7i96s --pktUART
That depends entirely on the oversample rate of the scope.
I would set the scope to say 500 usec/div and single sweep.

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

More
09 Oct 2024 00:13 - 09 Oct 2024 00:15 #311618 by PCW
Replied by PCW on topic Mesa 7i96s --pktUART
7I96S with  7i96sd_pktv2.bin firmware and previous sample modbus-relay
hal/ini files showing TX-/RX- (Yellow) and TX+/RX+ (Blue): all as expected.
(without relayboard connected so repeats at 1 sec timeout rate)


 
 
Attachments:
Last edit: 09 Oct 2024 00:15 by PCW.
The following user(s) said Thank You: nartburg

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

More
10 Oct 2024 07:03 #311702 by nartburg
Replied by nartburg on topic Mesa 7i96s --pktUART
Ok--- reloaded 7i96sd_pktv2.bin unhooked everything except for power, ethernet, and the oszi.

Got what we expected !! a nice signal equivalent to what you got!!

wrote a .mod for the SKI780 VFD hooked it up and was able to control spindle direction and speed while reading the vfd's potentiometer.

Great Mission accomplished!

Big cheer for PCW!!


Then it stopped --   no contact no signal

back to trouble shooting.

 

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

More
10 Oct 2024 18:42 #311761 by nartburg
Replied by nartburg on topic Mesa 7i96s --pktUART
To continue the story I ran as suggested by PCW 

Replied by PCW on topic Mesa 7i96s pktUAT on P1 OK if all I/O are high on power up and low after the mesaflash commands,
that means All P1 I/O bits are functional. so it's not likely a hardware issue.

Maybe the next step is to verify that you can do a loopback through the P2
RS-485 port.
File Attachment:File Name: echo_2024-09-27.txt
File Size:1 KB

 (you will need to "chmod +x echo.txt" to run it)

Will check if the 7I96S RS-485 hardware is OK

It requires a simple 6 pin loopback plug with TX+ connected to RX+ and TX- connected to RX-

When the plug is not inserted,  the expected result is
0000EFFF
00002FFF
00006FFF
 When the loopback plug is inserted (TB2 pins pin 15..20), the expected result is
0000EFFF
00000FFF
00006FFF

to retest the RS-485 hardware -- no difference between with loopback or with out it -->> so i presume the port is dead and decided to go for analog speed-control and direction pins and get the not so critical data with an USB to rs-485 adapter using the MB2HAL component.

Setting this up was quite simple and getting the values into axis pyvcp was also not a problem

but


that is a story for another topic:

Mesa 7i96s --USB error finishing read

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

More
10 Oct 2024 21:15 #311770 by tommylight
Replied by tommylight on topic Mesa 7i96s --pktUART


Mesa 7i96s --USB error finishing read

USB? How? Why? When? :)

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

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