Skip to content

Conversation

@ulikoehler
Copy link

Real-word example: The Stepperonline A6-EC servo drive, otherwise known as the Synmatic AS715N, download here: https://www.omc-stepperonline.com/de/a6-serie-100w-ethercat-ac-servomotor-kit-3000rpm-0-32nm-mit-bremse-17-bit-absolutwertgeber-ip67-a6-ec100l2b1-m17

Excerpt:

            <Device Physics="YY">
				<Type RevisionNo="#x00002EF8" ProductCode="#x00000715">A6N Servo Driver</Type>
				<Name LcId="1033">A6N_sAxis_V0.02</Name>
				<Comment LcId="1033">A6N Servo Driver</Comment>

It's not like the info is vitally important, but if we parse it, we can as well parse it properly.

Parsing it, at the moment, results in this error

$ cargo run --example basic STEPPERONLINE_A6_Servo_V0.02.xml
Error: Custom { kind: Other, error: "custom: unknown variant `Comment`, expected one of `Type`, `Name`, `RxPdo`, `TxPdo`, `Sm`, `Info`, `HideType`, `GroupType`, `URL`, `Profile`, `Eeprom`, `Fmmu`, `Image16x14`, `ImageFile16x14`, `ImageData16x14`, `Mailbox`, `Dc`, `Slots`" }

With the fix (excerpt, because it's really long):

EtherCatInfo {
   ...
        devices: [
            Device {
                physics: Some(
                    "YY",
                ),
                name: [
                    (
                        "A6N_sAxis_V0.02",
                        Some(
                            1033,
                        ),
                    ),
                ],
                desc: "A6N Servo Driver",
                comment: Some(
                    "A6N Servo Driver",
                ),

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant