Forum Replies Created
-
AuthorPosts
-
raazsiParticipant
Thanks, Manjey n Mikhail… It really helped. Now that I got to know that we can write our own script in RapidScada. It’s really helpful.
Meanwhile, i tried a bit on my own for generating reset output. I wrote a script wherein, the output is 1 for a specified duration and then it gets to zero. But I am facing a difficulty.
The input parameter for the function is a coil channel read via Modbus from the Modbus device. Is there any way to set the values of output/Input channel dynamically through a code??? I tried with CnlValSet(Int Cnl, Double Value) & SetVal(Int Cnl, Double Value) But I am getting an error with it…
Line 496, column 1: error CS0103: The name ‘CnlValSet’ does not exist in the current context
Below is the snippet of the code I am using. The algorithm which I intend to use is that if the value of coil register is 1, then the function will return value of 1 for 5 seconds and then it will return zero. Then I’ll make the value of coil register to zero inside the function itself to reset it.
bool Getreset (bool a,int InCnl )
{
// bool a is the value of coil registerint result;
DateTime now = DateTime.Now;
DateTime now2 = now.AddSeconds(5);
if (a==Convert.ToBoolean(1))
{
do
{
result = DateTime.Compare(DateTime.Now, now2);
if (result < 0)
return (Convert.ToBoolean(1));
else
return (Convert.ToBoolean(0));
} while (result < 0);
return (Convert.ToBoolean(0));
CnlValSet(Incnl,0);
}
else
{
return(a);
}
}raazsiParticipantI want to reset a timer in PLC from SCADA appication. I have a reset bit which when asserted high make timer again to zero.
SO i have put a command button in schematic With that i am sending discrete value 1. Is there any way to make it like a reset bit i.e. when i give command it is asserted high only for 1 cycle and hence after it gets back to zero again….
raazsiParticipantThanks for your valuable info 🙂
Is there any way of sending a trigger pulse ??? Like i want to give reset commandraazsiParticipantHi …
Thanks for your help.. Finally I could get my job done. I used binary command. This is how i did it.
I wanted to send numbers like 110, 120 etc. The device to which i am sending is configured for float data type. So in order to send decimal 110. I converted it into hexadecimal equivalent of ieeefloats
110 = 0x 42 DC 00 00
0x42 = 66
0xDC = 220Then I used formula
new byte[4]{0,0,66,220}raazsiParticipantHi,
I am sharing with you a document wherein I have shared screenshots and the configurations which I used to send data.
https://drive.google.com/file/d/0B16F1h3WZUUxYmVKM0k1U1RoaGc/view?usp=sharing
raazsiParticipantHello Mikhail,
I intend to communicate with Bristol Babcock Make RTU (PLC). I have already successfully communicated with it for reading its holding register values into RAPIDSCADA. For that, I had to assign data type as Float32 and byte order as {2301 5687 } in the communicator.
So I presumed that in order to write values to that PLC from RAPIDSCADA communicator I need to have my data type as Float32 and likewise I might have to tweak with byte order also.
Before actually writing values into PLC, I tried simulating it with mod_RS SIM.
I started with configuring my device template for COMMAND. Checked on Multiple command checkbox. Assigned My starting address as 40 and element count as 2. Then I went into command tab of the device in communicator and started giving the value of 14. Command type is Standard.
In the Communicator log, I got sent bytes as
Sent(17) : 00 00 00 00 00 0B 01 10 00 27 02 04 00 00 00 00(Hex OE for 14 not sent)
Receive (12) 00 00 00 00 00 06 01 10 00 27 00 02In the mod_RS SIM communication traffic, I got,
Write multiple Registers from 39 for 2 Registers.
RX : 00 00 00 00 00 06 01 10 00 27 00 02 (only 12 bytes Received)
TX: 00 00 00 00 00 06 01 03 00 09 00 0AThen I thought ok, lets test if for a single write, In that case in Communicator log i got sent bytes as:
Send (12) 00 00 00 00 00 06 01 06 06 00 27 00 0E (OE for value 14 is present)
Receive (7/7) 00 00 00 00 00 06 01
Receive (5/5) 06 00 27 00 0ESimilarly, in the mod_RS SIM communication traffic, I got,
Write Single Register 39.
RX : 00 00 00 00 00 06 01 06 00 27 00 0E
TX : 00 00 00 00 00 06 01 06 03 09 00 0A -
AuthorPosts