How and where to configure I/O port on Pico Universal Stepper Controller config?

More
05 Apr 2021 04:00 #204856 by dansawyer
I copied the configuration files from pico systems univstep dir into a linuxcnc configuration dir. When linuxcnc was run it created an option to translate to whiic I answered yes. Linuxcnc then produced the following error.
The question is what configuration line is entered into which file to change the port address from 0x378 to 0xd030?
(I realize this is low level but I am stumped. )
Thanks, Dan

Unrecognized line skipped: POC FMS LEN DIAM COMMENT
Unrecognized line skipped: 1 1 0.0 0.0 first tool
Unrecognized line skipped: 2 2 0.0 0.0
Unrecognized line skipped: 3 3 0.0 0.0
Unrecognized line skipped: 4 4 0.0 0.0
Unrecognized line skipped: 32 32 0.0 0.0 last tool
Note: Using POSIX realtime
PPMC: bus 0 epp_dir = 0
PPMC: bus 1 epp_dir = 0
PPMC: bus 2 epp_dir = 0
PPMC: checking EPP bus 0 at port 0378
PPMC: slot 0: nothing detected at addr 0 reads f
PPMC: slot 1: nothing detected at addr 1 reads 1f
PPMC: slot 2: nothing detected at addr 2 reads 2f
PPMC: slot 3: nothing detected at addr 3 reads 3f
PPMC: slot 4: nothing detected at addr 4 reads 4f
PPMC: slot 5: nothing detected at addr 5 reads 5f
PPMC: slot 6: nothing detected at addr 6 reads 6f
PPMC: slot 7: nothing detected at addr 7 reads 7f
PPMC: slot 8: nothing detected at addr 8 reads 8f
PPMC: slot 9: nothing detected at addr 9 reads 9f
PPMC: slot 10: nothing detected at addr a reads af
PPMC: slot 11: nothing detected at addr b reads bf
PPMC: slot 12: nothing detected at addr c reads cf
PPMC: slot 13: nothing detected at addr d reads df
PPMC: slot 14: nothing detected at addr e reads ef
PPMC: slot 15: nothing detected at addr f reads ff
PPMC: ERROR: no boards found on bus 0, port 0378

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

More
05 Apr 2021 15:15 #204908 by jmelson
Yes, the translator from 2.7 to 2.8 doesn't seem to fully do the job for ppmc configs.

But, the port address is easy. In file univstep_load.hal, near the top there will be a line
like :
loadrt hal_ppmc

change it to read :
loadrt hal_ppmc port_addr="0xd030"

You may also need to add epp_dir=1 if the above does not get it working.

Jon

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

More
05 Apr 2021 17:31 #204927 by dansawyer
Can you confrim the correct file and the syntax of the 'epp_dir=1' statement.
I tried adding the above the the univstep_load.hal file and it did not affect the operatoin. Is the location of the statement important?
Thanks, Dan

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

More
05 Apr 2021 22:33 #204975 by jmelson

Can you confrim the correct file and the syntax of the 'epp_dir=1' statement.
I tried adding the above the the univstep_load.hal file and it did not affect the operatoin. Is the location of the statement important?
Thanks, Dan

Are you working with LinuxCNC or univstepdiags? These changes to configs files will have ZERO effect on the diagnostic program, it DOES NOT use them. To use the diagnostic, you would use commands like :

sudo ./univstepdiags d030 bus

and

sudo ./univstepdiags d030 commtest

Once you have confirmed that the diags talk to the board at that port address, you then put the address into the univstep_load.hal file, and LinuxCNC ought to communicate, also.

Jon

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

More
06 Apr 2021 01:33 #205020 by dansawyer
The interface is now passing the commtest. I had the cable coiled in the bottom of the case. That made a pretty effective RF choke. Spreading it out cleared up the comm problem.

I am now on to linuxcnc. Below is the debug output from trying to run linuxcnc.

cat /tmp/linuxcnc.debug.j84Iqa
Unrecognized line skipped: POC FMS LEN DIAM COMMENT
Unrecognized line skipped: 1 1 0.0 0.0 first tool
Unrecognized line skipped: 2
2 0.0 0.0
Unrecognized line skipped: 3 3 0.0 0.0
Unrecognized line skipped: 4 4 0.0 0.0
Unrecognized line skipped: 32 32 0.0 0.0 last tool
Note: Using POSIX realtime
PPMC: bus 0 epp_dir = 0
Linux parallel port @53296 not found
PPMC: bus 1 epp_dir = 0
PPMC: bus 2 epp_dir = 0
PPMC: checking EPP bus 0 at port D030
PPMC: slot 0: nothing detected at addr 0 reads f
PPMC: slot 1: nothing detected at addr 1 reads 1f
PPMC: slot 2: nothing detected at addr 2 reads 2f
PPMC: slot 3: nothing detected at addr 3 reads 3f
PPMC: slot 4: nothing detected at addr 4 reads 4f
PPMC: slot 5: nothing detected at addr 5 reads 5f
PPMC: slot 6: nothing detected at addr 6 reads 6f
PPMC: slot 7: nothing detected at addr 7 reads 7f
PPMC: slot 8: nothing detected at addr 8 reads 8f
PPMC: slot 9: nothing detected at addr 9 reads 9f
PPMC: slot 10: nothing detected at addr a reads af
PPMC: slot 11: nothing detected at addr b reads bf
PPMC: slot 12: nothing detected at addr c reads cf
PPMC: slot 13: nothing detected at addr d reads df
PPMC: slot 14: nothing detected at addr e reads ef
PPMC: slot 15: nothing detected at addr f reads ff
PPMC: ERROR: no boards found on bus 0, port D030
hal_ppmc: rtapi_app_main: Operation not permitted (-1)
./univstep_load.hal:16: waitpid failed /usr/bin/rtapi_app hal_ppmc
./univstep_load.hal:16: /usr/bin/rtapi_app exited without becoming ready
./univstep_load.hal:16: insmod for hal_ppmc failed, returned -1
1265
Stopping realtime threads
Unloading hal components
hal_ppmc: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
rtapi_app: caught signal 11 - dumping core
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Waited 3 seconds for master. giving up.
Note: Using POSIX realtime
motmod: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
Note: Using POSIX realtime
trivkins: not loaded
<commandline>:0: exit value: 255
<commandline>:0: rmmod failed, returned -1
<commandline>:0: unloadrt failed
Note: Using POSIX realtime

cat univstep_load.hal
# loads all HAL modules for Universal Stepper controller with threading
# when emc2 starts it loads iocontrol

# kinematics
loadrt [KINS]KINEMATICS
#autoconverted trivkins
# motion controller, get name and thread periods from ini file
loadrt [EMCMOT]EMCMOT base_period_nsec=[EMCMOT]BASE_PERIOD servo_period_nsec=[EMCMOT]SERVO_PERIOD traj_period_nsec=[EMCMOT]TRAJ_PERIOD key=[EMCMOT]SHMEM_KEY

# next load the PID module, for four PID loops
loadrt pid num_chan=4

# install driver
#loadrt hal_ppmc
# loadrt hal_ppmc port_addr="0xd030"
loadrt hal_ppmc port_addr="0xd030"

# load realtime portion of scope, just to have it handy
loadrt scope_rt

# make some signals for the scope for tuning.
loadrt ddt count=4
loadrt estop_latch count=1
loadrt and2 count=1
loadrt not count=1

# set up the realtime thread
# read inputs first
addf ppmc.0.read servo-thread
# then run the motion controller
addf motion-command-handler servo-thread
addf and2.0 servo-thread
addf estop-latch.0 servo-thread
addf motion-controller servo-thread
addf not.0 servo-thread
# then the PID loops
addf pid.0.do-pid-calcs servo-thread
addf pid.1.do-pid-calcs servo-thread
addf pid.2.do-pid-calcs servo-thread
addf pid.3.do-pid-calcs servo-thread
# write outputs last
addf ppmc.0.write servo-thread

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

More
06 Apr 2021 02:59 #205029 by dansawyer
By trial en error the syntax is:
loadrt hal_ppmc port_addr="0xd030" epp_dir=1
Somewhere there is a documentation link between hal_ppmc and the port and epp options.

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

More
06 Apr 2021 13:41 #205109 by jmelson

By trial en error the syntax is:
loadrt hal_ppmc port_addr="0xd030" epp_dir=1
Somewhere there is a documentation link between hal_ppmc and the port and epp options.

Yes, it is actually in the comments in the file univstep_load.hal, at least in the latest versions.

But, your listing from the startup shows that it did NOT get the epp_dir=1
PPMC: bus 0 epp_dir = 0
...
PPMC: checking EPP bus 0 at port D030

Jon

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

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