# Modbus TCP – One Element value gives 4 Digital Inputs,

Forum Home Forums Communicating with Devices Modbus TCP – One Element value gives 4 Digital Inputs,

Tagged: , , ,

Viewing 9 posts - 16 through 24 (of 24 total)
• Author
Posts
• #4394
IncineratorX2
Participant

Yed thank you! I get my wished results ðŸ™‚

#4396
IncineratorX2
Participant

Unfortunatly, i found out.. the table values are not changing.
So my first check (by remote) looked to give the right values but after more testing the channel values don’t change at al.

I’ll come with more detail.

#4397
IncineratorX2
Participant

The current input value 0FFD -> 1111 1111 1101 (So IN2 is closed)
The Scada web interface shows IN1 closed, IN4 closed. Where did he get this from..?
If we physical change an input (closing it or opening it), nothing changes.

#4401
manjey73
Participant

Twenty-five again…. (Russian expression.)

You can make one channel number, for example 9, which will get the value from the device with the signal 9. And in the formula the estimated channels to write GetBit(9, 0), and so on ? there is no need to specify a signal in the calculation channel

If you have a channel 20 receives a signal from the device 9, then in the formula of the calculation channel it is necessary to specify the 20th channel. Example GetBit (20, 3) >0 ? 0: 1

• This reply was modified 1 year, 7 months ago by manjey73.
#4409
Mikhail
Moderator

Try
GetBit(Val(100), 0) > 0 ? 0 : 1
where 100 is the number of the referenced input channel.

#4412
IncineratorX2
Participant

we are testing, looking good.

#4415
IncineratorX2
Participant

Thank you very much, this was the problem.

We’ve created a Virt. Channel 32 – Discrete, which reads the device input 9.

And we’ve filled out each virtual channel per bit, with the GetBit(Val(9),n)
And this works! Tested with several open/closed

We didn’t enum text it yet. As i wanted to see the value.

Up to the next challenge, read out aprox 20x Current (0-20mA) sensor channels into Scada. (Thinking of raspberri/adruino via i2c and tranport via modbusTCP)

• This reply was modified 1 year, 7 months ago by IncineratorX2.
• This reply was modified 1 year, 7 months ago by IncineratorX2.
• This reply was modified 1 year, 7 months ago by IncineratorX2. Reason: image links broken
#4428
Mikhail
Moderator

Good!
For new questions, please create new topics.

#4432
IncineratorX2
Participant

Yeah i will ðŸ™‚ first finding the hardware… Thread may be closed.

Viewing 9 posts - 16 through 24 (of 24 total)
• The topic ‘Modbus TCP – One Element value gives 4 Digital Inputs,’ is closed to new replies.