Jump to content

Serial output out of the PLC

Recommended Posts


I am still learning how to work in Visilogic. I know how to make programs with lines of code, but programming in ladder is a bit different and I am still getting hang of it. One thing I can't understand properly is the communication between PLCs and the possibilites of communication with the computer.

What comes to PLC, my first encounter with it was with Arduino. I used it to give another life to my dashboard in car, and connected it to computer with serial communication, which I processed with Python. If anyone was interested, here is a video: https://www.youtube.com/watch?v=4ZL53YbkdXY (there are Slovak captions).

Is there something similar possible with Unitronics PLCs? I need to send some of the variables via serial communication so I can process them further with Python (I know how to do the Python part with pyserial, my question is how to send data with Visilogic).

I use SM35-J-R20 without ethernet card, so I see serial communication as my only option.

Thank you in advance,
best regards


Link to comment
Share on other sites


  In the Ribbon  starting with   Boolean, go to the end and under FB's  there is  Protocol

Protocol is a method to compose messages to be send or received over the Serial Port.

You can create simple or complex messages depending on the device you are communicating with and it's

   methods of  sending and receiving messages.

You can also receive and decode the messages  from the device.

Variables ( MI's, MB's, and others ) can be inserted or extracted from the messages.

Review the Help   for Protocol, and the Example programs ( Help - Examples - Communications - FB Protocols )

to learn how to effectively use this function.







Link to comment
Share on other sites

  • 2 months later...

hi, i been try to do serial communication of  unistream (us10) PLC with arduino (nano)  via the USB H port on the PLC. i can successfully send control characters to the arduino using a USB to TTL cable.

the problem now is i want to be sending different sensory values from the arduino to the PLC and im not able to receive or send any other value besides the control charecter in the message composer section. How exactly can i setup my message composer to receive such kind of data and is there any limitation is using the USB to ttl cable instead of using the RS232 modules

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