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 2022

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 2022

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

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.

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