raazsi

Forum Replies Created

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • in reply to: Problem in Sending Modbus (Command) Float32 data #2294
    Avatar
    raazsi
    Participant

    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 register

    int 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);
    }
    }

    in reply to: Problem in Sending Modbus (Command) Float32 data #2283
    Avatar
    raazsi
    Participant

    I 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….

    in reply to: Problem in Sending Modbus (Command) Float32 data #2275
    Avatar
    raazsi
    Participant

    Thanks for your valuable info 🙂
    Is there any way of sending a trigger pulse ??? Like i want to give reset command

    in reply to: Problem in Sending Modbus (Command) Float32 data #2269
    Avatar
    raazsi
    Participant

    Hi …

    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 = 220

    Then I used formula
    new byte[4]{0,0,66,220}

    in reply to: Problem in Sending Modbus (Command) Float32 data #2244
    Avatar
    raazsi
    Participant

    Hi,

    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

    • This reply was modified 2 years, 5 months ago by Avatar raazsi.
    • This reply was modified 2 years, 5 months ago by Avatar raazsi.
    in reply to: Problem in Sending Modbus (Command) Float32 data #2240
    Avatar
    raazsi
    Participant

    Hello 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 02

    In 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 0A

    Then 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 0E

    Similarly, 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

Viewing 6 posts - 1 through 6 (of 6 total)