s7-1500 data type conversion

edward.ortiz

Member
Join Date
Jun 2015
Location
Houston
Posts
28
I am working with a S7-1500 as the client and reading values from a S7-1200 server. The data coming across modbus tcp communication involves word data type. The word consist of 2 bytes(16 bits). The value of the bits will let me know if different type of alarms are active. I am having issues trying to extract the bits from the word. Can some please help me convert the word data type into 16 bits. If you need anymore information please let me know
 
If you want to access a bit within a tag use the syntax:
tagname.xn where n is the bit number in the tag.

If you are using a DB, the syntax is DBName.tagname.xn
 
If you want to access a bit within a tag use the syntax:
tagname.xn where n is the bit number in the tag.

If you are using a DB, the syntax is DBName.tagname.xn

Is this something new from the 1500 series? because i havent seen it in the good old 300/400.
 
Is this something new from the 1500 series? because i havent seen it in the good old 300/400.

Yeah, it is only supported in the 1200/1500, and it is really handy. It simplifies having to worry about byte swapping. TagName.X0 is the least significant bit and it counts up from there, without having to worry about where the bits are stored, or what order they go in, or if the system is big endian or little endian. You can also grab bytes, words, etc, out of a bigger tag.
 

Similar Topics

Looking for options to write data to Siemens PLC. Looking for something closest to way we were doing it with AB PLC and excel sheet. Old way...
Replies
7
Views
892
I am having trouble trying to figure out why the data access toll for the Micro 1500 is not working. I looked at the timers i want to be able to...
Replies
0
Views
649
Hello guys, this is my first post on this forum and i hope u can help me. Im doing a project where we need to read data in the Wincc Professional...
Replies
0
Views
1,036
Hi, I have an S7-1500 CPU which is data logging using DataLogCreate and DataLogWrite. I am logging at 5Hz so I want the ms value to be in the...
Replies
3
Views
2,060
Hello to PROFINET IO gurus. Has anybody seen this kind of error logged in an S7-1500 diagnostics buffer? This PLC application has two PROFINET IO...
Replies
4
Views
4,871
Back
Top Bottom