October 12, 2018 at 12:26 pm #4425
I am trying to read my digital inputs. I have 16 different inputs in 16 different bits of one register (1001)
Then I created 16 different input channels with different channel numbers from 35 to 59. They all have the same signal number(354).
I selected the channel type as calculated discrete.
I am using GetBit formula like this;
Formula used bar is checked.
The problem is it just shows the value of the last channel (59) in the web.
The rest is 0 and this is wrong.
I saw in the communicator that signal 354 is assigned to channel number 59 and the other channels from 35-58 were not in the list.
Could you please help me to solve this?October 12, 2018 at 5:08 pm #4430
For input channels bound to the same device, signals have to be unique. Anyway, only one channel is bound.
To use value from a one Communicator tag in many channels use channels of calculated type for other channels except the 1st.October 15, 2018 at 8:47 am #4438
Okey if I use discrete for the first channel then I will use calculated discrete for the followings.
how does the software understand the queue, from channel numbers or from signal numbers? And What if the channel numbers of these are not sequential ? Is this a problem?October 15, 2018 at 1:08 pm #4441
Could you provide an example?
Note: formulas are calculated in order of input channel numbers.October 15, 2018 at 1:25 pm #4442
For example I have 2 registers for my digital inputs (1001-1002).
and their signal numbers are 354 and 355.
I have digital inputs at input registers from 423 to 448 ( they are in order). They all have different signal numbers.
I selected channel type of the first digital input as discrete and the rest of them as calculated discrete. In this case, I can JUST read the value of register 1001’s 0th bit. The rest is not correct.
When we add an element group to read registers, they have 1 unique signal number.
Then when I create input channels, I am creating 16 input channels to read 16 different bits of 1 register. Then how should I bound them?? It is reading just one bit of it.
In communicator I can see that the register is just bound to one input channel but I want to give it to 16 input registers. How this is possible?October 16, 2018 at 3:04 pm #4445
In communicator I can see that the register is just bound to one input channel but I want to give it to 16 input registers. How this is possible?
One input channel is bound to only 1 tag in Communicator. For further calculations, you need to use one input channel (real type) as a source and other input channels of calculated type. If you post a link to a screenshot of your input channels, it would be easier to find a mistake.October 26, 2018 at 3:24 pm #4506
here is a screenshot of my input channel settings:October 26, 2018 at 6:27 pm #4508manjey73Participant
in Calculate Discrete – GetBit(Val(434),x)October 28, 2018 at 7:55 am #4510
Fix channel 434:
– No formula needed.
– Type is Real, because the channel contains a bit mask, not just one bit.
Fix other channels:
– No Signal field needed.October 28, 2018 at 7:56 am #4511
in Calculate Discrete – GetBit(Val(434),x)
Yes. This is very important.October 30, 2018 at 5:21 am #4518
I changed according to your advice : https://www.dropbox.com/s/sd5nljc5koxudz3/input%20channels.JPG?dl=0
But the results are still wrong.
I did not understand, why I dont need formula for channel 434. I want to assign the 8th bit of register 1001 to channel 434. and 9th bit of register 1001 to channel 435… continues likes this.October 30, 2018 at 5:27 pm #4522
You need to apply #4508
I did not understand, why I dont need formula for channel 434
Because if you get only 1 bit in the channel 434, you can’t reference 434 to calculate bits for other channels.October 30, 2018 at 5:28 pm #4523
434 is the source channel that have to be full as received from a device.October 31, 2018 at 5:06 am #4527
I got the point now, thank you !
- You must be logged in to reply to this topic.