norcotek

Serial data reader and ladder app for weigh station

5 posts in this topic

Hello,

 

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>

 

Where:

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

 

 

 

 

0

Share this post


Link to post
Share on other sites

There are quite a number of example projects that come with VisiLogic. Have you looked at those? They can be accessed through the top line menu: Help / Examples...

0

Share this post


Link to post
Share on other sites

Step 1: Get the V120 to read the scale.  

 

Look at the Examples to get you started on the Protocol block and then read the Help.  Then post your code- is extremely difficult to guess what your program is doing without seeing it.

 

Joe T.

0

Share this post


Link to post
Share on other sites

Can someone post the load cell example for me?  My visilogics software does not have the file.  Thanks.

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now