S7 over tcp bit manipulation

Ido Tamir

Member
Join Date
Jul 2004
Posts
1
Does anyone know how to set a single bit using the WRITE \ FETCH mechanism?
I am using VB6 and connected via TCP to an S7 PLC.

Currently I'm using a whole byte to do this, but that means I need
a byte for every bit I'm setting ..

Any other way to do it?

Thanks

Ido
 
If you organize your communication data correctly you can manipulate 8 bits separately as needed and move them into a byte that is sent. On the other end they can be broken out similarly. This allows you to control the bits singly but send in byte or word format which is more efficient anyway.
 
Hi Ido!

I had the same problem trying to connect Cimplicity HMI to S7-300,
using Cimplicity OPC server for Siemens TCP/IP. All the
boolean variables are read-only when using this OPC Server.
So I had to use a whole byte for each push button I had in my
program!

A way to go around this issue, especially if you have to optimize
the memory usage, would be to "pack" more bits into one byte
and write all of them at the same time. I had started doing something
like that, but I had to give up, and provide just a working
solution, not an elegant one, in the shortest amount of time.

Regards,
Adina
 

Similar Topics

Hi. I'm struggling over some basic stuff here. 41001 I is a 16 bits integer that I'm able to read with InTouch. What I need to do is to read...
Replies
1
Views
97
Hi, Im doing a project with a Power meter that offers Modbus TCP and each signal is a 32bit Float.¨ I tested the float in Modbus Poll and...
Replies
22
Views
3,094
Hi eveyone. I need transfer signal from system 1 to DCS via modbus. System 1 only can send 32 bit floating point. DCS receive 16 bit integer. How...
Replies
20
Views
10,624
Hi folks, I have a Controllogix in communication with a zigbee coordinator using Logix AIO for modbus tcp. This zigbee coordinator have 3 slaves...
Replies
0
Views
53
I have a PH meter that I am trying to bring its data into 1756-L81. I have downloaded the Rockwell MODBUS AOI kit, but I am not sure if I need to...
Replies
5
Views
182
Back
Top Bottom