Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important information on the platform change.

cancel
Showing results for 
Search instead for 
Did you mean: 
SOLVED

C# data type problem with EAL IParameter.WriteData Method IndraDrive

C# data type problem with EAL IParameter.WriteData Method IndraDrive

LeoB
Member

Hello,
I have a problem with the IParameter.WriteData Method using C# on CtrlX Core.

I want to set an IDN in "P-0-0023" via the IParameter.WriteData Method in C# on the CtrlX Core.
Docu of method only contains an example on how to write an int:
https://apps.boschrexroth.com/docs/oci/eal/?topic=html/a75857a0-f90e-1bed-e5c0-c31531886d3d.htm
Docu of IndraDrive PSB Parameters: 
https://www.boschrexroth.com/documents/12605/25199817/R911328651_14.pdf/5ad2c515-c201-9666-83ac-6c5d...

So as a first step i printed all possible IDNs using "S-0-0025" using the following code:

get_idns.png

 And i got the following print in the console:

all_IDNs.png

So as a next step i tried the following code to set an IDN in "P-0-0023".

try_set.png

But both tries didnt work out 😞
Does anyone know how... 
1) i can print all the IDNs from "S-0-0025" in a readable way?
2) how to set an IDN in "P-0-0023"?

Thanks a lot!
Best regards, 
Leo

3 REPLIES 3

CodeShepherd
Community Moderator
Community Moderator

Could you give us some more insights in your setup?

  • Your IndraDrive is connected to a ctrlX CORE via Ethercat and EoE is active?
  • You are suing the EAL library to talk to the drive
  • Where is the EAL running? is it on your PC or did you pack it in a snap?

Thanks for your reply 🙂

  • Your IndraDrive is connected to a ctrlX CORE via Ethercat and EoE is active?
    -- Yes, IndraDrive is connected to a CtrlX Core via Ethernet. The communication is working well.
  • You are using the EAL library to talk to the drive?
    -- Exactly. In detail, i want to use the drives Oscilloscope function to read data. To activate it, a few parameters must be set before reading the data. The IParameter.WriteData() Method works fine when it comes to setting integer values, like for P-0-0020. I used the Method multiple times and it worked. The only problem is: I don't know how to use the Method to set an IDN (for example for P-0-0023). Which data format must be used? 
  • Where is the EAL running? is it on your PC or did you pack it in a snap?
    -- The C# program is packed in a snap and running on the CtrlX Core.

    Summary:
    The whole setup is working well. Using IParameter.WriteData and IParameter.ReadData are working well with binary or decimal variables. The only thing I can't do is to use the IParameter.WriteData Method() to set an IDN, for example for P-0-0023. The documentation says, the input is of type "IDN" with a length of "4Byte". How does a format of 'IDN' looks like in C#? Here are the documentations:

    Bildschirmfoto 2021-12-08 um 16.13.43.pngBildschirmfoto 2021-12-08 um 16.11.11.png

    Thanks a lot for your help!

RexCode
Long-established Member

Hello LeoB

please try to write the value of P-0-0023 by type of System.UInt32 (4byte).

You can calculate the parameter type (IDN) by an offset. For S Parameter the offset is 0, for P Parameter the offset is 32768.

Example:

  • S-0-0051 = 51
  • P-0-0048 = 48 + 32768

Best regards,

Christoph

Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist