Jump to content

Recommended Posts

Serial Protocol function block. Unless computer is running SCADA software that is already MODBUS oriented. What model of Vision are you using? There is an example program for hyperterminal to PLC communication. I have a modified example for V430 that is bidirectional (scan and send FB's) serial comms PC runs realterm (or hyperterminal if your OS is old enough). 

Link to comment
Share on other sites

ok!

what about wire connection.

is it a full duplex wire connection?  I use usb serial adapter and I connect MJ10-22-CS25  as an adapter to go with a 4 pin cable to port 1. i tried also a crossover wire in the middle bud doesn't work.

 I did that also with a gsm modem on port 2 with a cross over db9 modem cable and it work. so i thought that might be the correct setup but it's not

 

Link to comment
Share on other sites

There used to be a specific communications pdf within the Unitronics documentation download, which I think would be good for you to have.  But I can't find it online now.  The nearest I get is the online version here   https://unitronicsplc.com/Download/SoftwareHelp/VisiLogic_Knowledgebase/VisiLogic.htm      

And then click on Communication and drill down.

The disappearance was discussed in part here:   

  

However, I have temporarily attached the old pdf for you to download direct.  Will delete it within a few months due to the size limits.

cheers,

Aus

VisiLogic - Communications.pdf

Link to comment
Share on other sites

Using "Legal Entry" as the send trigger wasn't working.  If you look at it online you'll find that it gets set ON and stays on.  

I sized this down to fit on my V570, which is my testing unit.  I added a separate button for SEND and it seems to be working.  I also added a CR (ODh) as an ETX character to make it easier to work with my terminal program.

See if it works for you.

Joe T.

RS232communication on V570.vlp

Link to comment
Share on other sites

I made some modifications on the last version.

I add auto reply the received message and i  modify the protocol by adding some index.  ( i used ..\Project examples\Strings\V280_Receive_number_and_string.vlp )

following that index i tried to raise a mb at line 4 , but did'n work. 

(more or less i had in mind the configuration of a SMS CONFIG but as far as I know there is no such function in that case)

what do you think?

RS232 COMMAND.vlp

Link to comment
Share on other sites

As I mentioned in another post, Unitronics is not as fast as you think when it comes to communication functions.  It takes a few scans for the Protocol blocks to settle down and re-cock themselves.

I added a short delay in the "Echo" command.  I didn't test this, so you'll have to tell me if it works.  If it does work, try playing with the timer preset to see how fast it can go.

Joe T.

RS232COMMAND JT.vlp

Link to comment
Share on other sites

  • 3 weeks later...

Unlike actual Unitronics support employees, I don't have a selection of all PLC models to test on.  So I had to size the graphics down to the PLC I have handy.  Don't move the graphics around until it's working so I can easily help.

I tested the program again seems to be working on my end.  Notice the value in MI 1302 - Index of Message.  MI 1302 = 0 is valid - it means it received the first message.  The block starts counting at 0.  Look at the numbers in the purple column of the Protocol Scan block config window.  When it goes to -1 it means the block didn't understand what was sent and it didn't match any of the defined message formats.  But it did scan.  MB 1302 will not come on if it doesn't find a legitimate message.  And when it does it only stays on for one scan.

I added MB 0 to net 5 - Session complete memory.  It comes on when the PLC receives a legal message.  You have to press Clear Screen to reset it.

I changed net 4 to look for message index = 0, not 1.  I think it works the way you expect now.

You can reset MI 1302 to 0 and see for yourself if you send an improperly formatted message such as "ABC", as opposed to the properly formatted "#ABC*".   That's what the STX and the ETX check boxes are for.

Play with it some more to get a better feel for the block.  It's not the simplest thing in the world.

Joe T.

RS232COMMAND JT 1.vlp

Link to comment
Share on other sites

Hello Joe.

thank you for your effort!  it was really helpfull.

actually it worked like before, no matter if the input was in the list it returns 0 at MI1302. 

if the msg was not recognised it returns like you said -1.

however  the scan like you said it's working but it was always stopping at first index where it was getting the received message to fill the variable in MI 1310 . 

That's why as far I undrstand it was returning always the 0. 

I change the protocol scan and I keep the row where transfer the received msg to variable  MI1310 at the end. so the received msg pass from all the rows before go to that row. It works!

now MI1302 get values like 0 for #0000* , 1 for #1234* and 2 for any other valid format msg 

thank you very much once again for the support.

 

 

 

Untitled.jpg

Link to comment
Share on other sites

  • 11 months later...
On ‎11‎/‎21‎/‎2017 at 11:11 AM, Joe Tauser said:

Unlike actual Unitronics support employees, I don't have a selection of all PLC models to test on.  So I had to size the graphics down to the PLC I have handy.  Don't move the graphics around until it's working so I can easily help.

I tested the program again seems to be working on my end.  Notice the value in MI 1302 - Index of Message.  MI 1302 = 0 is valid - it means it received the first message.  The block starts counting at 0.  Look at the numbers in the purple column of the Protocol Scan block config window.  When it goes to -1 it means the block didn't understand what was sent and it didn't match any of the defined message formats.  But it did scan.  MB 1302 will not come on if it doesn't find a legitimate message.  And when it does it only stays on for one scan.

I added MB 0 to net 5 - Session complete memory.  It comes on when the PLC receives a legal message.  You have to press Clear Screen to reset it.

I changed net 4 to look for message index = 0, not 1.  I think it works the way you expect now.

You can reset MI 1302 to 0 and see for yourself if you send an improperly formatted message such as "ABC", as opposed to the properly formatted "#ABC*".   That's what the STX and the ETX check boxes are for.

Play with it some more to get a better feel for the block.  It's not the simplest thing in the world.

Joe T.

RS232COMMAND JT 1.vlp

Dear Joe Can You Please Re Post The File "RS232COMMANDJT1.vlp" or on anravindranatha@yahoo.com

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