Siemens 1500 cpu TRCV_C error 809B

larsjohan85

Member
Join Date
Jan 2019
Location
Bergen
Posts
5
Hi all experts!

I'm having a bit trouble with UDP communication with a CPU 1512SP-1 PN and a Kongsberg Seatex MRU 3.

The MRU is set to output values in a UDP broadcast packet, IP address 192.168.0.20, subnet 255.255.255.0.

PLC is set to ip 192.168.0.10, subnet 255.255.255.0.

A connection is set up for the MRU, local ID 0x100, Partner is set to "(All broadcast devices)" and connection type is set to UDP connection.

Program consists of a single network in OB1 with a TRCV_C FB with a separate instance DB. All inputs and outputs are to a DB (Params) for easy troubleshooting.

Is there something i have overlooked in the configuration? I get error 0x809B "InterfaceID is invalid".

Repository: https://github.com/larsjohan85/S7-1500_MRU

MRU%20config.PNG


TIA%20Network.PNG


TIA%20Watch%20table.PNG


UDP%20Conn%201.PNG


UDP%20Conn%202.PNG


UDP%20Conn%203.PNG


Kind regards
Lars Lone
 
Connect.ID is set to 1. It should be 100 hex or 256 decimal.
It also looks like the hardware identifier must be W#16#FFFFFFFF, and not W#16#100.

Also, are you sure that the connection must be set to broadcast ?
Sounds unusual to me.
I would guess it should be an unspecified connection.
 
Hi

I tried to change connect.id to 16#100 or 256 decimal, and InterfaceID to 16#FFFF (max value), but unfortunately no difference in error code.
I also tried to remove partner in connection settings, but no change also.

TIA%20Watch%20table%202.PNG
 
Interface ID is your hardware ID for the X1 or X2 RJ45 port on your PLC. ID 64 for interface 1 or ID 72 for interface 2 (if you have one)

You can just connect the system constants Local~PROFINET_interface_1 and _2 and the TCON block will eat it automagically.
 
Last edited:
Great advice folks! Now i'm getting further along here!

I tried to remove everything and set it up from fresh, and now it looks like its trying to receive at least!

TIA%20Watch%20table%203.PNG


It alternates between busy and error with error code 80C9 that i think is a timeout.

I'm quite new to TIA Portal, but this InterfaceID, is it the Device number from Profinet interface? In this case 0?

TIA%20Profinet%20device.PNG


I have verified that the MRU is sending data by Wireshark capture, so I suspect some other parameter is wrong.
 
A 1512SP only has 1 interface, though you can have 3 ports on the same interface. Since you only have 1, a HWID of 0 should refer to that, I believe. A PLC like S7-1515 has two interfaces, and you have to specify which one to connect through. It's a system hardware constant, and you can reference to it by writing Local~PROFINET_interface_1 or Local~PROFINET_interface_2.
They will, however, always have the values 64 and 72.
 
Does Kongsberg have a way to test the sensor ?
Can you connect a PC and then have an application on the PC display data from the sensor ?
Do you have alink to any documentation about communicating with the sensor ?
 
Thanks folks! Now it looks like the communication is working fine!

The MRU has its own configuration software with integrated signal monitor that uses the same datastream as the PLC receives, so I have verified that the MRU is sending data!

Now for a bit unrelated topic. I'm receiving the data as an array of bytes, but i need to put it in a struct to structure the data received. it's mostly Real, with a DWord status word in there also.
The problem is that the MRU sends 3 bytes of data before the measurements: Header, packet lenght and a token, followed by 32 bit values.

If I try to read the data directly into a struct, it will discard the 4. byte and then fill the rest of the Real array, but one byte shifted. Is there any way of preventing this?

data_structure.PNG


Manual for the MRU can be found here
 
Last edited:
The reason for that happening is because when you setup the receiving structure in TIA, TIA will start addresses on even Bytes when you change data type (from BOOLs to INTs for example) or if you yourself start a new structure.
The solution is to define a receive buffer with simple bytes. Then copy in code from the receive buffer to the real data structure you want.

edit:
You cannot copy the entire struct. Not sure how you have managed to do it, it should not be possible since they do not have the same structure.
Maybe you have used POKE.
You must copy either the basic elements or the substructures.
I.e.
data.header := buffer.header
data.len := buffer.len
data.roll := buffer.roll
data.pitch := buffer.pitch
etc.
 
Last edited:
I am mystified as to what serialize/deserialize actually do.
It certainly looks like a complex way to get the same thing done.
Does serialize/deserialize take into account that the data gets shifted 1 byte in the middle of the structure ?
In the Siemens FAQ, the example merely shows data of different type but same size (WORD - INT).
 
Finally got everything to work.

I just saved the three header bytes and shifted all float values 3 bytes left, added the 3 bytes and then did an AT assignment to get it into the desired format.

Thanks for all your help!

Kind regars
Lars
 

Similar Topics

Hi guys I was asked a question this weekend which I don’t know the answer. I hope you can help , we had an issue with a Siemens 1500 where the...
Replies
2
Views
1,494
Hi, I have been looking on ebay for a while trying to find a good deal. Most are from overseas and i'm a little skeptical about purchasing them. I...
Replies
12
Views
2,116
Hi! Is there any internal temperature sensor in the S7-1500 CPU (processor temperature)? If yes, is it accessible from the user program code? We...
Replies
5
Views
3,634
Hi, In OB1 there is no Prev Cycle time anymore. Is there a solution to have something like this ? Or do I have to substract the previous clock...
Replies
3
Views
2,909
I have developed quite a few functions and fb’s for Simenes 1200’s but now I’m making a bigger application and I ordered an ET200s but I have to...
Replies
3
Views
3,164
Back
Top Bottom