Jump to content

Recommended Posts

Hello,

 

i am working with a Vision 120 and a stepper motor trying to have these two devices communicate.  

The stepper motor can communicate via rs-485 so i have setup my v120 to do so.

In my ladder i have initiated com port 2, setup for rs485, 9600 baud, no parity, 1 stop bit and have setup protocol config function block.

using protocol send function block i have successfully sent a command to the motor and made it run.

Now i am trying to query the motor by sending a query command, i know that the command is correct because i am using hyper terminal to monitor the data and i see the valid reply.  

the reply is ?/0`751232, where /0 is the address of the recipient (according to the manual there is no way to change this), i assume the "`" character is some kind of separator, and 751232 is the numeric response.  the manual also mentions end of message characters of EXT 0D 0A for each response.

After i send my query command, i use a protocol scan FB i setup the STX to be ?/0` (i have also tried ?/0, /0`, /0) and i setup a ML numeric variable to store the numeric response and setup the EXT characters.  im not sure if i am using this FB correctly, i think i am making plc look for a message that starts with ?/0` and store the next set of numbers but i never see anything in the ML.  

I have also tried using the protocol buffer reset command prior to sending the query.  

The motor manual has a section called understanding the response where it details the responses in hex but i think i am seeing an ascii response in hyper terminal.

 

Any help will do.

Thanks.

I have attached the stepper motor manual

 

 

User_Commands_Manual_(256x_Stepping_2.0A_Version).pdf

Link to post
Share on other sites

Serial communication is always tough at first.  For starters, use your Protocol block to put the entire received string into one register array just to see if the PLC is getting it.  If you get a response, copy it to a second set of registers and then reset the buffer.  

 

You can use the "Memory" tab at the bottom of the screen to set up an online ASCII data monitor.

 

You may have to upgrade to a V130.  I have had trouble with RS485 on V120s and the V130 comes with a much nicer set of COM port debugging tools.

 

Joe T.  

Link to post
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...