Difference between revisions of "TinyCtrl Initial Setup of Linux Board"
Line 68: | Line 68: | ||
==Load Amp Config== | ==Load Amp Config== | ||
− | The firmware configuration for the stepper motor controllers needs to be uploaded to the boards and the zero position offsets need to be set. I usually do this over the CAN bus directly as described here [[Define the zero position offsets]]. The parameter file to be used is: <code>igus_5DOF_SV_AE_AmpParameter.dat</code> | + | The firmware configuration for the stepper motor controllers needs to be uploaded to the boards and the zero position offsets need to be set. I usually do this over the CAN bus directly as described here [[Define the zero position offsets]]. The parameter file to be used is: <code>igus_5DOF_SV_AE_AmpParameter.dat</code>. A USB 2 CAN adapter is required. |
Do not forget to unplug the CAN adapter from USB of the desktop PC after loading the Amp config, otherwise CPRog will show module dead as it is trying to connect via the CAN adapter first. | Do not forget to unplug the CAN adapter from USB of the desktop PC after loading the Amp config, otherwise CPRog will show module dead as it is trying to connect via the CAN adapter first. | ||
[[Category:TinyCtrl]][[Category:Downloads]] | [[Category:TinyCtrl]][[Category:Downloads]] |
Revision as of 09:40, 25 June 2018
Note that any Board that ordered from Commonplace Robotics will definitely have been set up like this already. However this document may provide some insight about what is happening behind the scenes:
This is what we do to a virgin Phytec board when integrating it into a DCi robot.
This document assumes that you know what you're doing and that you are familiar with linux console environments.
This procedure applies to DCi robots and Linux Embedded Control Electronics shipped after April 2018
Download
Download the full, zipped folder structure: TinyCtrl_Full
Connect to the Phytec Linux Board
- Connect both computers, i.e. the embedded linux computer and the Windows PC, with an ethernet cable. Use the right LAN port on the embedded Linux Board.
- The desktop computer needs to be set to a static IP like
192.168.3.2
. - The Phytec Linux board has IP
192.168.3.11
by default.)
- The desktop computer needs to be set to a static IP like
Copy TinyCtrl/ into /home/root/
scp TinyCtrl_Full.zip root@192.168.3.11:/home/root/ ssh root@192.168.3.11 unzip TinyCtrl_Full.zip rm TinyCtrl_Full.zip cd TinyCtrl chmod +x TinyCtrl chmod +x startBatch.sh cd
Install TinyCtrl Service
vi /etc/systemd/system/autostart_tinyctrl.service
hit i
paste this:
# This is part of systemd.
[Unit]
Description=TinyCtrl autostart
DefaultDependencies=no
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/home/root/TinyCtrl/startBatch.sh
StandardOutput=syslog
[Install]
WantedBy=sysinit.target
Hit ESC
Save and close.
:wq!
Enable the service
systemctl enable autostart_tinyctrl.service
Start the service
systemctl start autostart_tinyctrl.service
At this point the green LEDs of the stepper motor boards and the DIO board(s) should start blinking, which indicates that TinyCtrl is communicating with the boards via the internal CAN bus connection between the Phytec Linux board and the robot control electronics.
Reboot:
reboot
After the reboot TinyCtrl should start automatically, which can be observed by looking at the same green blinking green LEDs.
Load Amp Config
The firmware configuration for the stepper motor controllers needs to be uploaded to the boards and the zero position offsets need to be set. I usually do this over the CAN bus directly as described here Define the zero position offsets. The parameter file to be used is: igus_5DOF_SV_AE_AmpParameter.dat
. A USB 2 CAN adapter is required.
Do not forget to unplug the CAN adapter from USB of the desktop PC after loading the Amp config, otherwise CPRog will show module dead as it is trying to connect via the CAN adapter first.