[etherlab-users] mini.c modify
Florian Pose
fp at igh-essen.com
Thu Jun 25 11:06:44 CEST 2009
Hello,
On Wed, Jun 24, 2009 at 05:10:39PM -0600, Drew Bertwistle wrote:
> I am new to ethercat and etherlab. I am running into some errors I
> am attempting to modify the mini.c program for use with a temposonics
> sensor. The XML file provided by temposonic and my edits to the
> mini.c file are shown below. Loading the module reports that 'this
> operation is not permitted' According to the log the program gets as
> far as "Registering PDO entries" and then the master is released. But
> I don't get an error saying 'PDO entry registration failed!'. I
> introduced a prink statement after the registering pdo entries section
> but before #if EXTERNAL_MEMORY and that point in the program was not
> reached.
If the PDO entry registration fails, there is certainly a reason given
in the logs. Please post the respective(!) lines of your syslog file,
perhaps with setting 'ethercat debug 1' before loading mini.ko.
> const static ec_pdo_entry_reg_t domain1_regs[] = {
> {AnaInSlavePos, MTS, 0x3101, 16, &off_ana_in},
Here you are registering a PDO entry (0x3101:10) that you never
configured (below).
> static ec_pdo_entry_info_t MTS_pdo_entries[] = {
> {0x3101, 1, 16}, // channel 1 status
> {0x3101, 2, 32}, // channel 2 value
> {0x3101, 3, 32}, // channel 3 value
> };
> static ec_pdo_info_t MTS_pdos[] = {
> {0x1A00, 3, MTS_pdo_entries}
> };
> static ec_sync_info_t MTS_syncs[] = {
> {1, EC_DIR_INPUT, 1, MTS_pdos},
> {0xff}
The XML states that the inputs are assigned to Sm3 (not Sm1). This is
not the reason for your current problem, but it would be the one for a
future problem. ;-)
--
Best regards,
Florian Pose
http://etherlab.org
More information about the Etherlab-users
mailing list