Sign in to follow this  
Followers 0
gvg

Serial comm with FX1N PLC

1 post in this topic

I need to communicate with a Mitsubishi PLC using Matlab. To do that, I open a serial communication with the appropiate parameters (7,e,1,9600), and write an ASCII message based on the manual I have (attached). I have tried examples as the one in the attached image. The response starts with a 6, that is, the ASCII number for ACK, so something must be working. But the rest of the response is junk (149, 149, 149...), although its length depends on the input length (if I add terminator, the response is longer, and so on). I am completely stuck. Some information that might be helpful:

  • I am using a Serial to USB converter that I have used successfully with other PLC (which used Modbus, so everything was easier)
  • There's a VB application (of which I don't have the code) that is able to connect to the PLC (I need to connect directly without using this intermediate app). I have decompiled it trying to get some info, but was just able to confirm the 7,e,1,9600 parameters, since the rest of the code is too mangled to analyze
  • The attached manual was sent to me by the guy who designed the PLC and its ladder code, so I guess it is the correct one
  • I have tried the echo mode (TT) to no avail, response is always the same
  • I have some doubts regarding the reading of a value (see attached image). Why is there a second message from the PC? Shouldn't I just need to read the response?
  • GX Developer tells me that the address D8120 (which is supposed to define the comm format and protocol) contains a 0, which seems weird.

Any help or hint would be greatly appreciated. Thanks

jy992d69901e.pdf

fxcomm.png

Share this post


Link to post
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
Sign in to follow this  
Followers 0