July 26, 2017 at 8:11 am #2399
I have a trouble when I want to send setpoint value to Device (connecting to OPC). I use dynamic text to send desired values but in the scheme received values are different.
The command values are created in the attached pictures (1).
I set in command values 10;50.5;101.5
Results of command are different 0,1,2. (can see in the pictures)
Anybody can help me.
the pictures are here.
https://photos.app.goo.gl/nkdT9QJJJywbMaUy1July 26, 2017 at 10:43 am #2400
When transferring 10;50.5;101.5 are values, this is the text for the buttons.
The value is precisely 0 , 1 and 2
Need for a control channel to write a formula that will check the value 0,1 or 2 and substitute these values instead of the required 10, 50.5 или101.5
And may also have the formula of permutation bytes, if you work directly with the device. With OPC has faced, may not require.July 26, 2017 at 1:19 pm #2402
Note: in English control channels are named “output channels”.July 26, 2017 at 2:09 pm #2405
I also tested with the simple formulas ( Cnl*100) but the commands returned only 0.00. Without formula results are 0.00 1.00 and 2.00. I dont know data type of the results. Is int or real or string?July 26, 2017 at 2:30 pm #2406
All formulas return a double, but to enumerate the possible integer values only.
On; Off; Reset values 0, 1 and 2
; Off; Reset values 1 and 2 appear to have two buttons Off and Reset
In the output channel to be used in the formula Cmd*100 (example)
Or write more complex formula in the database of formulas, call it for example Out_real, and to apply the output channel Out_real(Cmd)
Where is Cmd will get the values 0, 1 or 2 and depending on them you will return the desired value.
July 27, 2017 at 2:23 am #2408
- This reply was modified 1 year, 8 months ago by manjey73.
I’ve writen a formula
if(Cnl==0) return 10.5;
if(Cnl==1) return 50.0
if(Cnl==2) return 101.5
it’s correct.July 27, 2017 at 3:55 pm #2418
Talking about commands, you should use Cmd instead of Cnl.
Anyway this formula causes compilation error because a function must return a value from all logical branches.July 27, 2017 at 3:57 pm #2419
If you can use Visual Studio, the Formula Tester project helps you to debug your formulas.July 27, 2017 at 5:09 pm #2420
Thank so much Mikhail.June 18, 2018 at 6:19 pm #3868
I have tried to do exactly what has been proposed, but it doesn’t work. I want to send a setpoint to an address (in my case a pH setpoint to the address 2109 in a modbus device). In the Communicator I’ve created a command, and tried to send a new setpoint from the “Commands tab”. The message “The command has been sent successfully” appeared, but the setpoint has not been changed. In the log file there is no trace from the command and in the “Devices data” of the communicator no command is shown.
All input channels work perfectly. I still haven’t create any output channel.
H E L P ! ;-)))
Thank you in advance
T.June 20, 2018 at 8:05 am #3878
In the log file there is no trace from the command
You need to find info in a communication line log. The name of the file is C:\SCADA\ScadaComm\Log\lineXXX.log
I think this will clarify the cause.June 20, 2018 at 8:06 am #3879
The command has been sent successfully
This message means sending command from the shell to the service.December 18, 2018 at 8:03 pm #4750
I have similar problem and I did not find ansver there.
I have output chanel and it working corectly when I send command directly what mean to on/off I send 256/512 value.
To simplifiy I trying to convert to 0/1 by Formula “(Cmd*256)+256”.
What ever I did allways I get:
2018-12-18 20:53:32 Command to the Device 10 “Bufor_4_chanel”, type: KpModbus, address: 4
Send (8): 04 06 00 01 00 01 19 9F
Receive (5/5): 04 06 00 01 00
Receive (3/3): 01 19 9F
what mean it sending 1 instead 512(calculated formula)?
Can You help with it,please?December 18, 2018 at 10:28 pm #4751
OK. I found something.
It not working when I send command from communicator.
When I created table with commands formulas started convert values as it should.
Question, what it difference when I send command from Communicator and WebInterface?
In Communicator I send Standard command?
RegardsDecember 19, 2018 at 2:13 pm #4754
When you send a command from Webstation, it goes to Server and can be modified by formula. Server passes the command to Communicator. When you send a command from Communicator, there is no calculations.
You must be logged in to reply to this topic.