Analog signal conversion
I have one Analog input which i used to measure material level.
Now my question is i want use this same analog siganal to the other PLC to see this same material level on that HMI.
How can i do it?
What i try that this AI signal i add in the hardware at AO channel. But during download time hardware error is come.
Answers
Hi,
I think you have a type of variable mismatch.
What is the type of your variable Signal? Read about RealIO in the help.
It depends of what you need to do. There are a few possibilities, some of them:
In case the input variable SignalIn is RealIO, you have to declare a new variable SignalOut of type RealIO.
Somewhere in application to type:
SignalOut:=SignalIn; (* transfers all the properties of RealIO variable *)
or better
SignalOut.Value:=SignalIn.Value; (* transfers only the value of the IO variable *)
and attach SignalOut to your analogue output channel. Scaling of Input and output channels should be the same (min and max from properties tab)
In case you need to assign a real value from the application to the output channel then
SignalOut.Value:=RealSignal;
I think you have a type of variable mismatch.
What is the type of your variable Signal? Read about RealIO in the help.
It depends of what you need to do. There are a few possibilities, some of them:
In case the input variable SignalIn is RealIO, you have to declare a new variable SignalOut of type RealIO.
Somewhere in application to type:
SignalOut:=SignalIn; (* transfers all the properties of RealIO variable *)
or better
SignalOut.Value:=SignalIn.Value; (* transfers only the value of the IO variable *)
and attach SignalOut to your analogue output channel. Scaling of Input and output channels should be the same (min and max from properties tab)
In case you need to assign a real value from the application to the output channel then
SignalOut.Value:=RealSignal;
Add new comment