Jump to content

Simple Serial Read From Load Cell via RS232


Recommended Posts

Hello,

 

I am new to Unitronics and have just bought a SAMBA unit (SM43-J-R20) with the optional serial port (V100-17-RS4X) and I need some help with getting started.

 

I need to read a load cell via RS232 from the optional port, but am having issues doing so. I've watched some webinars about MODBUS, but am not sure if this is what I need and if it is, what parameters I need to enter. I am using a Cooper Instruments load cell with a digital display. I found the following information in a PDF for the load cell:

 

The output string is in the following format:

<STX> <SIGN> <WEIGHT(7)> <STATUS> <ETX>

 

Where 

  • STX: Start of transmission character (ASCII 02).
  • ETX: End of transmission character (ASCII 03).
  • SIGN: The sign of the weight reading (space for positive, dash (-) for negative).
  • WEIGHT(7): A seven character string containing the current weight including the decimal point. If there is no decimal point, then the first character is a space. Leading zero blanking applies.
  • STATUS: Provides information on the weight reading. The characters G/N/U/O/M/E represent Gross / Net / Underload / Overload / Motion / Error, respectively.

 

On the PLC Info screen, I have the following information for COM 2:

 

Protocol: MODBUS

RS Type: RS232

Params: 9600 ,8,n,1

Silence: 3650us

the Rx value is constantly incrementing, but under the Monitor screen, there is no value. 

 

Any help would be greatly appreciated as I am new to Unitronics and don't know where to begin. 

 

Thank you for your time.

 

 

Link to comment
Share on other sites

Modbus is a defined protocol that does not use a changing message format. It sounds as if the loadcell you are connecting with uses a custom protocol as you defined. This can absolutely be read into our controller using the Message Composer features within UniLogic.

 

If you are unfamiliar with this feature or custom protocols we have a helpful webinar that should help explain how to set it up within our software. This will allow the application to both accept ASCII code and send replies if necessary. Using the link below or navigating to our YouTube channel there is a tutorial regarding the Message Composer.

 

Message Composer Tutorial: https://www.youtube.com/watch?v=G8bWtpYDt7E

Link to comment
Share on other sites

Flex, you are correct that was my mistake. Although I had read it was the Samba, my mind went to UniLogic since we were in this subforum.

 

Gherman, it would be a similar process to accept and send ASCII strings with the Samba over RS232. Please find the correct tutorial for the FB protocol blocks which will be used for the Samba and our ViisLogic software.

 

http://www.unitronics.com/support/webinars/fb-protocol

  • Upvote 1
Link to comment
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
×
×
  • Create New...

Important Information

This site uses cookies. By clicking I accept, you agree to their use.