Jump to content

Shahid

Members
  • Posts

    7
  • Joined

  • Last visited

Posts posted by Shahid

  1. I have sorted out most with help of you guys, thanks.

    I think there is some issue between hex to ASCII conversion whilst sending on protocol. I was trying to send HEX as ASCII but wasn't working then I inserted relevant ASCII characters to which sensor responded. Do I need to convert stored value to ASCII first then link in Scan FB Protocol?

    Also, Scan FB is working on when I insert checksum byte as control character as shown below. As a variable it is not working, is it the same issue of ASCII to HEX conversion?

    checksum_cr12.JPG.88842dcfe3c186353a26466c5dbe575d.JPG

    Thanks

     

  2. Hello everyone,

    I have just completed this program and want some suggestions/ inputs before testing to get this done efficiently.

    I'll be really grateful for any suggestions/ errors pointed out.

    This is the overall program.

    1.thumb.JPG.3a8f3f0a913168ee00c346b7d56a81c6.JPG

    Initialized com port

    2.JPG.35d2d5b029e140cc8eaab9ad4112e462.JPG

    Protocol Configuration

    3.JPG.96f38fa176594de05ec2f5cbd15e4506.JPG

    I need to send this request and stored EA020113 in MI-1.

    send.JPG.fa80671454544330296ca24c42f0f998.JPG

    Stored value (EA020113) is sent after 100ms interval.

    4.JPG.535bf1d7daef8627984ec6092eca1b53.JPG

    This is the send protocol which I have used.

    5.JPG.3a895890aab481be7398c3a7f20faa44.JPG

    Following is the expected response from the sensor.

    recieve.JPG.a7a5759f85eab8840ea3b46c56e81fa3.JPG

    I have used STX, 2 byte variable and checksum.

    6.thumb.JPG.5410a7a7f9e813b4e6cf77e3dff21edb.JPG

    This is my checksum byte setting.

    7.thumb.JPG.579182b88c72485d3de9e64ee457de32.JPG

    The two byte response is stored in MI-10 and as per response 0-11 bits contain speed. So, I have used following masking technique (0x0FFF AND Response) to get 0-11 bits which are then stored in MI-15.

    8.JPG.f86135665f6786886f699c47b192dbe6.JPG

    Then finally created this Numeric variable on HMI (Link: MI-15) to display speed.

    9.thumb.JPG.a788bea9734a3b4c07cacf84f745d91c.JPG

     

    Please someone go through steps and check everything is fine. Specially, checksum in receive and masking of received message.

    Regards

    Shahid

  3. Thanks for the reply

    I have attached pics of the protocol used by sensor.

    For RS485, it supports polling EE (Controller sends 2 byte message and Sensor No. 2 responds with only speed message) and EA (Controller sends 4 byte command and sensor responds in A Format).

    I just need a simple example for init com, polling EE, receiving response and display it on HMI for now.

    Using this example , I will go for and EF (configuring).

    Thanks

    1.JPG

    2.JPG

    3.JPG

  4. Hello Everyone,

    I am new to this community and to Unitronics PLC. I have worked on the PLCs but I am not familiar with Unitronics PLC and its software.

    I am trying to connect with sensor that responds to data over RS485 (polling). I have the sensor registers and commands that are obviously in ASCII.

    I need to write and read from sensor over RS485.

    Can someone please just provide me a sample program to initialize COM, Send Command, Read Response and display this on HMI?

    I just a sample then I can workout for the whole program, the controller I am using is V130-33-T38.

     

    Looking for guidance

    Shahid

×
×
  • Create New...