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

IL_ECATSoeRead Problem

IL_ECATSoeRead Problem

Filip_K
Established Member

Hello

I have got problem with IL_ECATSoeRead function block from CXA_ETHERCATMASTER library.

I want to read S-0-0403 parameter value from HCS. I am using the IL_ECATSoeRead function block. After executing this function block I got an error:

Filip_K_0-1673511509560.png

After pressing Yes it opens new file manager window to find a library, but it is already installed.

After pressing No it opens windows like this:

Filip_K_1-1673511553027.png

The PLC program is then stopped and goes to Exception. What could cause this problem?

Currently I am also using the IL_ECATSoeWrite function block from the same library and it works perfect. I can write parameter value to the drive, there is no problem with this function block... but the IL_ECATSoeRead is not working 😕

Is there a solution for this problem? Maybe there is something wrong in this function block?

Best regards, Filip

 

 

2 REPLIES 2

CodeShepherd
Community Moderator
Community Moderator

You are giving a number (SIZEOF) into "ValueAdr" but it needs to be a pointer.

 

...
ValueAdr:= ADR(wValueRead), 
...

 

So the function block will access a wrong storage address via this "pointer" and get an access violation (and so an exception) ctrlX PLC Engineering tries to debug the code and asks if you want to open the source. As it is a compiled library you cannot access the internal source code and get the error.

See an example in this topic.

Ohh yes... I made a typical "ctrl + C & ctrl + V" mistake and I didn't see that there should be ADR instead of SIZEOF in this line. Now everything is working correctly. Thank you very much for you quick answer and for you help :).

Have a nice day 🙂

Filip

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