nasa-jpl / jsd

Just SOEM Drivers
Other
18 stars 15 forks source link

Multiple product codes #94

Closed MartynStaalsen closed 9 months ago

MartynStaalsen commented 11 months ago

I've encountered an issue where different physical instances of the same Beckhoff slice have slightly different product codes because they're different revisions. Despite the revision difference, both pieces of should be able to use the same jsd interface. Unfortunately, jsd seems to be built around the assumption that there's exactly 1 product code per piece of hardware. Any recommendations on how to accomodate multiple product codes per interface without just copying and pasting the driver with and renaming everything?

d-loret commented 10 months ago

@MartynStaalsen, you could try something similar to what we did with the driver for Elmo Platinum motor controllers. There are two models of the drive with different codes but the same basic functionality that we support. So instead of directly referring to the product code, a helper function was written to check whether the product code is compatible.

MartynStaalsen commented 10 months ago

Thanks for the suggestion, I'll look into this!

On Thu, Aug 17, 2023, 6:36 PM d-loret @.***> wrote:

@MartynStaalsen https://github.com/MartynStaalsen, you could try something similar to what we did with the driver for Elmo Platinum motor controllers. There are two models of the drive with different codes https://github.com/nasa-jpl/jsd/blob/master/src/jsd_epd_types.h#L11-L17 but the same basic functionality that we support. So instead of directly referring to the product code, a helper function was written to check whether the product code is compatible https://github.com/nasa-jpl/jsd/blob/master/src/jsd_epd.h#L101-L108.

— Reply to this email directly, view it on GitHub https://github.com/nasa-jpl/jsd/issues/94#issuecomment-1683207299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUZM4CC22G7DMLXEN2B47HDXV3BJDANCNFSM6AAAAAA22IUZPA. You are receiving this because you were mentioned.Message ID: @.***>

Disclaimer

The information contained in this communication from the sender is confidential. It is intended solely for use by the recipient and others authorized to receive it. If you are not the recipient, you are hereby notified that any disclosure, copying, distribution or taking action in relation of the contents of this information is strictly prohibited and may be unlawful.

This email has been scanned for viruses and malware, and may have been automatically archived by Mimecast, a leader in email security and cyber resilience. Mimecast integrates email defenses with brand protection, security awareness training, web security, compliance and other essential capabilities. Mimecast helps protect large and small organizations from malicious activity, human error and technology failure; and to lead the movement toward building a more resilient world. To find out more, visit our website.