Jump to content

Serial data reader and ladder app for weigh station

Recommended Posts



We need support/guidance for implementing the following use case in a V120 series PLC. The PLC will need to be configured to use the RS232 interface to continuously read string data from a load-cell controller, and control solenoid valves with three coils that will be used for an automatic filling application based on weight:


The V120 will read data continuously from a load-cell weight controller via one of the RS232 interfaces. The data that the weight controller sends will be in the following format:


<STX> <POL> xxxxx.xx <L/K> <G/N> <STAT> <CR> <LF>



<STX> is the start of transmission

<POL> is the polarity of the data which can be either <space> for positive or "-" for negative

xxxxx.xx are digits for the weight data with two decimals

<L/K>  will be K for "kilograms"

<G/N> will be G for "gross"

<STAT> can be either <space> for valid, "M" for motion or "O" for over/underrange

<CR> <LF>  are carriage return and line feed respectively.


In general terms, the PLC logic will need to

  1. Authenticate a user with a 3 or 4 digit user code
  2. Allow the user to enter a recipe that consists of three weights (one for each valve/actuator), so the operator will need to enter three values (Kg1, Kg2, and Kg3) with the keyboard for three different variables.
  3. After confirming the recipe on the screen, the operator is asked to confirm if he/she wants to "continue, correct the recipe or abort".
  4. Once the user confirms to continue, the PLC will activate the first coil to open the first valve and leave it open until the weight reading reaches the amount for Kg1 at that point closing coil1, then it continues to the next valve, opens it and leaves it open until the weight reading has reached Kg1+Kg2, and so on, until the batch finishes. 

We would also like to use data tables to store the "batch data" and keep a certain amount of historical data in the PLC memory, each line in the data table should basically have the following columns:

Date/time stamp when the batch started, the values for Kg1, Kg2 and Kg3, the operator user code.


Our questions for this forum are:

  • Are there any example applications that we can use as a "base" to implement this project? We are not experienced in VisiLogic, but we think that with proper guidance we can adapt existing projects and tackle this well.
  • Specifically what we are most "concerned" with is proper implementation of the serial protocol read logic, and the storing of historical batch data in the PLC data table.
  • Any other suggestions are welcome.


Thank you,





Link to comment
Share on other sites

  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...