7i90 questions

More
09 Feb 2017 17:48 #87684 by JR1050
7i90 questions was created by JR1050
hi,

Im working on building a piece of equipment, similar to a chain driven tool changer, but swaps pallets on a tombstone. My choice to run this in lcnc, and I was just going to use the plc side of it and write the logic as components. I would like to give the 7i90/Pi3 in SPI mode combo a try. There are some other threads on the subject, it looks like it should work.

Question 1, the 7i90 does not appear(from reading the manual and other threads) to have spi loaded on its flash, so I assume this needs to loaded with a bit file?
2, The manual seems to state you can load the bitfile thru the rs422 port, using mesaflash but also seems to indicate that spi must already be present on the fpga. This is confusing. How does one get the spi bit file loaded? In another thread it is indicated the spi has to be loaded thru jtag, which I have zero experience with.

3 dumb question, none of the connectors indicate pin one , which is pin one on the 26 pin connector and which is one on p1-p3? Pin one is where the little white rectangle is?

thank you ahead of time

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

More
09 Feb 2017 17:54 #87685 by PCW
Replied by PCW on topic 7i90 questions
Yes, pin one is where the white rectangle is
(also the square pad on the connector looking from the back)

7I90s are shipped with EPP firmware so you must use mesaflash/PC with EPP to change the firmware


The RS422 port is used in the HM2_serial and sserial remote modes,
You should be able to re-program the 7I90 in hm2_serial mode but only if its
already got hm2_serlal firmware loaded

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

More
09 Feb 2017 18:16 #87688 by JR1050
Replied by JR1050 on topic 7i90 questions
thanks, more dumb questions, since most computers dont have a parallel port any more , will a usb( or plain old rs232) to parallel converter work to load the spi on the eprom?

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

More
09 Feb 2017 18:31 - 09 Feb 2017 18:49 #87690 by PCW
Replied by PCW on topic 7i90 questions
No, you really need a EPP port + Mesaflash

I should add that if you want to use SPI it would be better if that was specified on
the order so the 7I90 could be pre-propgrammed with a SPI config
Last edit: 09 Feb 2017 18:49 by PCW.

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

More
27 Feb 2017 16:27 #88679 by JR1050
Replied by JR1050 on topic 7i90 questions
Im kinda stuck here, its probably a typo, i missed something or there is some incomplete documentation.
Im running a 7190 in epp mode right now on a desktop with an on board p-port. This is my first go with a 7i90, ive had excellent success in the past with 5i20, 5i25 and 5i23.This will eventually be in spi mode with a rpi3.

p-port seems to be there.. and is set for epp in bios
3.202276] parport_pc 00:07: reported by Plug and Play ACPI
[ 13.202331] parport0: PC-style at 0x378 (0x778), irq 7 [PCSPP,TRISTATE]

using mesaflash i successfully loaded the 7i90_epp_justio, bit
user@CMP-0179:~/Downloads/7i90/configs/hostmot2$ sudo mesaflash --device 7i90 --epp --verify 7i90_epp_justio.bit
Checking file... OK
File type: BIT file
Boot sector OK
Verifying EEPROM sectors starting from 0x100000...
|VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV

Board configuration verified successfully.


when i try to load up the lncnc, it errors out, attached is dmesg

File Attachment:

File Name: errors.txt
File Size:54 KB


I seem to have success at the command line
halcmd: user@CMP-0179:~$ halrun
.
halcmd: loadrt hostmot2
halcmd:
halcmd: loadrt hm2_7i90 ioaddr=0x378 ioaddr_hi=0x0778 epp_wide=0 debug_epp=0
halcmd:

from my hal file- doesnt seem to work

loadrt hm2_7i90 ioaddr=0x378 ioaddr_hi=0x0778 epp_wide=0 debug_epp=0

# load low-level driver
loadrt hm2_7i90 config="firmware=hm2/hostmot2/7i90_epp_justio.bit"

i seem to regularly get this error from lcnc
insmod for hm2_7i90 failed, returned -1
See the output of 'dmesg' for more information.

Ive been away from this for about a year or two and a bit rusty, all and any help is appreciated.thanks
Attachments:

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

More
27 Feb 2017 16:43 #88682 by PCW
Replied by PCW on topic 7i90 questions
A couple things
Do you really have two loadrt hm2_7i90 lines in your hal file? that wont work

also you cannot specify firmware for a 7I90 (or most newer mesa cards) since the configuration is
preloaded in flash memory

loadrt hostmot2
loadrt hm2_7i90

should just work (at 0x378 since thats the default PP address))

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

More
27 Feb 2017 18:16 #88690 by JR1050
Replied by JR1050 on topic 7i90 questions
thanks. with any reference to the 7i90 commented out, it seems to load the driver and lncnc will start up. It has no i/o pins of any kind in hal show.

Previously i have used the recommended procedure for adding functions and parameters like so

setp hm2_7i90.0.watchdog.timeout_ns 10000000


# ################################################
# THREADS
# ################################################

addf hm2_7i90.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread # revel in the free time here from not having to run PID
addf hm2_7i90.0.write servo-thread
addf estop-latch.0 servo-thread


addf hm2_7i90.0.pet_watchdog servo-thread

this now pulls up an error on any line that has hm2_7i90.0. on it.

I would think lcnc needs to the added functions to address the driver? I have tried several different bit files with the same results. Documentation on the 7i90 seems scarce. what am i missing. I have had issues in the past with text editors putting weird stuff in hal files. Im using gedit.

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

More
27 Feb 2017 18:19 - 27 Feb 2017 18:19 #88691 by PCW
Replied by PCW on topic 7i90 questions
did you try just these 7i90/hostmot2 lines in your hal file?

loadrt hostmot2
loadrt hm2_7i90

If so did you get any error messages?
Last edit: 27 Feb 2017 18:19 by PCW.

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

More
27 Feb 2017 18:27 #88692 by JR1050
Replied by JR1050 on topic 7i90 questions
complete hal file

######################################
#
# HAL file for HostMot2 with 3 steppers
#
# Derived from Ted Hyde's original hm2-servo config
#
# Based up work and discussion with Seb & Peter & Jeff
# GNU license references - insert here. www.linuxcnc.org
#
#
# ########################################
# Firmware files are in /lib/firmware/hm2/7i43/
# Must symlink the hostmot2 firmware directory of sanbox to
# /lib/firmware before running EMC2...
# sudo ln -s $HOME/emc2-sandbox/src/hal/drivers/mesa-hostmot2/firmware /lib/firmware/hm2
#
# See also:
# <www.linuxcnc.org/docs/devel/html/man/man...ml#config%20modparam>
# and wiki.linuxcnc.org/cgi-bin/emcinfo.pl?HostMot2
#
# #####################################################################


# ###################################
# Core EMC/HAL Loads
# ###################################

# kinematics
loadrt trivkins

# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT servo_period_nsec=[EMCMOT]SERVO_PERIOD num_joints=[TRAJ]AXES

# hostmot2 driver
loadrt hostmot2
############ioaddr_hi=0x0778 epp_wide=0 debug_epp=0

# load low-level driver
loadrt hm2_7i90


# load estop latch component
loadrt estop_latch


setp hm2_7i90.0.watchdog.timeout_ns 10000000


# ################################################
# THREADS
# ################################################

addf hm2_7i90.0.read servo-thread
addf motion-command-handler servo-thread
addf motion-controller servo-thread # revel in the free time here from not having to run PID
addf hm2_7i90.0.write servo-thread
addf estop-latch.0 servo-thread


addf hm2_7i90.0.pet_watchdog servo-thread





# ######################################################
# Axis-of-motion Specific Configs (not the GUI)
# ######################################################



# ##################################################
# Standard I/O Block - EStop, Etc
# ##################################################

# A basic estop loop that only includes the hostmot watchdog.
net user-enable iocontrol.0.user-request-enable => estop-latch.0.reset
net enable-latch estop-latch.0.ok-out => iocontrol.0.emc-enable-in
#net watchdog hm2_7i90.0.watchdog.has_bit => estop-latch.0.fault-in

# create signals for tool loading loopback
net tool-prep-loop iocontrol.0.tool-prepare => iocontrol.0.tool-prepared
net tool-change-loop iocontrol.0.tool-change => iocontrol.0.tool-changed



message in errors parameter or pin not found

hm2_7i90.0.watchdog.timeout_ns

I know im rusty, its been a few years

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

More
27 Feb 2017 18:38 - 27 Feb 2017 18:40 #88693 by PCW
Replied by PCW on topic 7i90 questions
If you start this ini/hal file set from a terminal, are there any error messages?
( addf hm2_7i90.0.pet_watchdog servo-thread would be an error in any LinuxCNC version newer than 2.6 )

Also a clean dmesg log of _one_ LinuxCNC launch with that exact hal file would help
To do this, do
sudo dmesg --clear
launch linuxcnc
dmesg > dmesg.txt
Last edit: 27 Feb 2017 18:40 by PCW.

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

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