AMSMARTINS Posted March 14, 2023 Report Posted March 14, 2023 Hi all. I'm trying to read and write some data from a ultrasonic generator via Ethercat. Reading single variables it works , but if I try to read an array with 22 elements (show all the values in this array) it doesn't work . Please see the image attached. The idea was to read all the values in the ARRAY[0..21] OF UINT at the same time, is that possible or I have to do 1 by one ? Speaking with technical support of the welding generators they can do this with TIA Portal. I added to attached files an exemple from backhoff as well. Reading the manual for the Weld Generator from Telsonic the index, and Subindex should be Read_Struc.Index:=UINT#16#2013; Read_Struc.Subindex:=UsINT#16#16; Read_Struc.IsCompleteAccess:=FALSE; Buts as I said above I can only read the first element of the array or Read_data[0] Thanks
photovoltaic Posted March 14, 2023 Report Posted March 14, 2023 Have you tried Subindex 0 and IsCompleteAccess = TRUE?
AMSMARTINS Posted March 15, 2023 Author Report Posted March 15, 2023 Hi. Thanks for your reply Yes, I tried that but no success so far. I tried as well with the sub index Read_Struc.Subindex:=USINT#16#16; "For ADOs which consist of several values (array), where only one individual value is accessed, the subindex “0” is the size of the array (read-only). The subindexes 1...N correspond to the values 0...N-1 of the corresponding ADO" Any Ideas ? Thanks again
photovoltaic Posted March 15, 2023 Report Posted March 15, 2023 You are close. Your error code - 1803 - indicates reception buffer overflow. Your ReadDat variable needs to be N+1 so resize it to [23] and try the same method. You should always give yourself a few extra bytes with the comm instructions, I would go [30] to start.
AMSMARTINS Posted March 16, 2023 Author Report Posted March 16, 2023 Thanks for your replay. With subindex=0 and IsCompleteAccess = TRUE and with some extra bytes it works. Thanks for your help .
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now