Jump to content

RS232 and Protocol Copy Buffer issue


Recommended Posts

Hey all,  I am able to send data to my machine via a simulated RS232 data stream.  I can successfully use the COPY BUFFER FB to a MI vector but any other operand is failing.  Ideally I would like to write my buffer to a set of MLs.

The below logic works on any MI. Anything else and it will not copy over.  I can still see the data coming into the PLC (V700) in  info mode (Serial>Monitor).  Is this a known issue where we have to use MI or is there a trick?

image.png.89b09db2c4bc20a067fecdc6b5d0f249.png

Link to comment
Share on other sites

Hi;

 

Net 3   -- Protocol Scan

     Why are you using the 1 second pulse to scan?   This means your program only runs this every second for 1 scan cycle.

          Data can show up anytime!

   Remove the 1 Second Pulse and let it run free and collect the data as it comes.  

Consider using the session complete  MB4001  to copy data to the   COPY BUFFER  in a new net

 

DanT

Link to comment
Share on other sites

  • MVP 2023

So Mal, you are saying that although you can select ML in the copy to buffer popup, it doesn't happen and only can be done on MIs? 

Aside from Dan's comments, have you tried other operands available there to see if they work?  In the past I have had other operands that don't work even though they are able to be selected in varied popups...I can't name specifics, just worked around it at the time after giving up, so maybe this is the case here.

And Dan, as this is a send, does that not change your comment?  Edit... see more comment below.

cheers, Aus

Link to comment
Share on other sites

Hi;

Your code does not show the setup for the Protocol Scan -- How the data is structured to receive

For FB  Protocol Scan setup,  refer to an example in    Help    Examples  :

    Help  Examples   Version 900    Projects      Communications   FB Protocol    V130_Receive _4_Numbers

There is also an example for  FB  Protocol Send  (  to send data to another device)   in the same examples folder.

 

DanT

Link to comment
Share on other sites

  • MVP 2023

Dan politely pointed out to me via messaging that it is Scan in use.  I had only read Mal's written stuff, and hadn't really looked at the ladderwork.  Specifically....."I am able to send data to my machine" which had me thinking that it was all related to sending.  My main focus was on the ML not working, as I have had the same sort of thing happen elsewhere.

So apologies to Dan,   and Mal...how did it all end up?

cheers, Aus

Link to comment
Share on other sites

  • 1 month later...
On 4/28/2023 at 5:30 PM, Ausman said:

Dan politely pointed out to me via messaging that it is Scan in use.  I had only read Mal's written stuff, and hadn't really looked at the ladderwork.  Specifically....."I am able to send data to my machine" which had me thinking that it was all related to sending.  My main focus was on the ML not working, as I have had the same sort of thing happen elsewhere.

So apologies to Dan,   and Mal...how did it all end up?

cheers, Aus

Everything turned out great!  Sorry for the late response.  I was able to get it working but only if I saved the buffer to MI's.  From there I used a struct to turn the buffer into a more usable object.

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