Jump to content

visilogic-v130 RS485 communication


Recommended Posts

Hey all, I'm new programmer in visilogic IDE and my device is v130-33-TA24.

My program purpose is to communicate via RS485, 9 bits to receive data from device.

I initialized COM1 and set protocol Send&Scan by the connected device protocol. but nothing is show on screen(I've linked the received data into number on screen).

I add some pictures for description. 

I'll be  glad for help :)

COM1 initilze.PNG

protocol-config.PNG

send.png

recive.png

Program.PNG

Link to comment
Share on other sites

  • MVP 2023

Also please explain rung 2 some more.  If you're receiving data, why is there a send?  Which is likely upsetting the scan as well.

FYI, for anything like this, I always perfect what I need to do using the PC first. Once that is working perfectly, you can then transpose things into the PLC much, much easier.

cheers, Aus

  • Thanks 1
Link to comment
Share on other sites

  • MVP 2023

Also, I'm not sure MB 1 is necessary (all the configuration and initialization will take place immediately before the program executes the next rung). What you might need is for SB 41 to SET a bit and use that bit (direct contact) to initiate your communication, with a RESET of the bit at the end.

  • Thanks 1
Link to comment
Share on other sites

  • MVP 2023
12 hours ago, Gabriel Franco said:

I use Function In Progress as a condition to SCAN block.

That is correct. Use SB 41 to SET a bit. Then use a Direct Contact of that bit, followed by an Inverted Contact of the Function in Progress bit, then your communications, then a RESET of the first bit, similar to below:

image.png.63be8f16f53841789892b38a4c5237b3.png

Link to comment
Share on other sites

Hey all, thanks for your replies.

 

I succeed to check the message transmission by rs485 9 bits(Some string).

But I wonder if anyone can explain me how to send, by specifically protocol commands a 9 bit of data.

For example,  I have an 11 bit of payload:

0, 10 -for STA and STO.

The ninth else for data and another bit for address.

How can I, via protocol FB, send that? 

Every single cube in the protocol message is a regularly  8bit-1byte? Even though I changed it to 9 bit at the com init?

 

Thank you all,

Itay.

 

 send.png

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.