Forum Home › Forums › Communicating with Devices › Modbus TCP – One Element value gives 4 Digital Inputs,
- This topic has 23 replies, 3 voices, and was last updated 7 years, 1 month ago by
IncineratorX2.
-
AuthorPosts
-
October 10, 2018 at 10:19 pm #4394
IncineratorX2
ParticipantYed thank you! I get my wished results 🙂
October 11, 2018 at 8:19 am #4396IncineratorX2
ParticipantUnfortunatly, 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.
October 11, 2018 at 8:35 am #4397IncineratorX2
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.-
This reply was modified 7 years, 1 month ago by
IncineratorX2.
-
This reply was modified 7 years, 1 month ago by
IncineratorX2.
-
This reply was modified 7 years, 1 month ago by
IncineratorX2.
October 11, 2018 at 10:05 am #4401
manjey73ParticipantTwenty-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 7 years, 1 month ago by
manjey73.
October 11, 2018 at 6:22 pm #4409
MikhailModeratorTry
GetBit(Val(100), 0) > 0 ? 0 : 1
where 100 is the number of the referenced input channel.October 11, 2018 at 6:28 pm #4412IncineratorX2
Participantwe are testing, looking good.
October 11, 2018 at 6:41 pm #4415IncineratorX2
ParticipantThank 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/closedWe 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 7 years, 1 month ago by
IncineratorX2.
-
This reply was modified 7 years, 1 month ago by
IncineratorX2.
-
This reply was modified 7 years, 1 month ago by
IncineratorX2. Reason: image links broken
October 12, 2018 at 5:05 pm #4428
MikhailModeratorGood!
For new questions, please create new topics.October 12, 2018 at 5:25 pm #4432IncineratorX2
ParticipantYeah i will 🙂 first finding the hardware… Thread may be closed.
-
This reply was modified 7 years, 1 month ago by
-
AuthorPosts
- The topic ‘Modbus TCP – One Element value gives 4 Digital Inputs,’ is closed to new replies.