Sign in to follow this  
Followers 0
LeDude

FX3u-485-BD & IMS MDrive 23 Plus

25 posts in this topic

Hi guys, I am trying to send ASCII commands to an IMS 23 Plus motor. http://www.imshome.com/products/mdrive23plus_mdi.html I can send commands from HyperTerminal and it works just fine. With a different drive I did this via RS232 and an FX3u-232-ADP, which worked quite easily. So now I have the FX3u-485-BD and I connected the drive this way: RDA to TX- RDB to TX+ SDA to RX- SDB RX+ GND to GND My little test program seems to work (the red SD-Light lightens up) - see attachment. What am I doing wrong? The parameters should have been correctly6, too. Please have a look at the PinOut of the drive and my program. It must be something really simple.... But I just can't get it to work. Cheers - I appreciate your help. 23_Plus.pdf Edited by LeDude

Share this post


Link to post
Share on other sites
For one M8103 should be M8403. What should be the comm setup for your port ?

Share this post


Link to post
Share on other sites
Here are the settings from the HyperTerminal. I send MR 99999 using HT and the motor starts moving. Not so with GX Developer. I also corrected my program. Attached you can see my settings. I am sure I connected the drive & the PLC correctly. Gambit, I appreciate your help. Thank you

Share this post


Link to post
Share on other sites
For one thing, you need a terminator code (carriage return) at the end of your string. You did hit ENTER after typing the string in on HyperTerminal right? That's a CR and LF. The ASC command converts the string, does not insert the return or the termination code for the end of string. So you need to add a hex code at the end for the CR & LF (carriage return and line feed). Since your string is 8 characters long, that will occupy 4 registers, D1-D4. Use MOV H0D0A to move those 2 ASCII codes to D5. Then set the number of characters to send to 10 in your RS2 to send that string.

Share this post


Link to post
Share on other sites
I added the CR&LF - still no success :( In D8062 I can read out Error# 6201: Parity error, overrun error or framing error I checked the parity, and since I am using the same settings as in Hyperterminal there shouldn't be a problem. But what's overrun error and framing error? How do I fix that? Thanks again Edited by LeDude

Share this post


Link to post
Share on other sites
You've still got some problems with the adressing. First: D8062 should be D8063 for this card, check the error message in this memory instead. Also; you use an ADP card with Channel1. Does this mean that you have a CNV-BD card between the main unit and the ADP card? If you have a BD comm-card, the ADP will be Channel2.

Share this post


Link to post
Share on other sites
Right now I am only using the FX3u-485-BD, which is channel 1. Therefore D8063 is 0, since I am not using an -ADP at all.

Share this post


Link to post
Share on other sites
No, you're using the RS2 instruction, and therefore you will have to check D8063 (when using channel 1)!! D8062 only applies when using the RS instruction. I would start with re-checking the devices you are using to ensure that they correspond with the RS2 instruction - RS2 is not the same as RS. I would in general just re-check your program. Your last line of code is also adressed wrong, and a little "odd"...!?

Share this post


Link to post
Share on other sites
OK Gentlemen, I am still stuck. At least I am getting a new error! Ch1: D8063 6304 Defective data format I am getting quite desperate now :D In the attachment is the drive-info! Did I connect it correctly? RDA to TX- RDB to TX+ SDA to RX- SDB to RX+ GD to GD mdi14plus_qr.pdf Edited by LeDude

Share this post


Link to post
Share on other sites
It seem correct, however some manufacturers mark the pins a little different. You could try connecting: RDA to RX- RDB to RX+ SDA to TX- SDB to TX+ GD to GD If this don't work, post your lines of code so that we can see.

Share this post


Link to post
Share on other sites
Hey le Dude, I didn't checked all of your attachements, but one difference between the ADP and BD is that the ADP supports full duplex and the BD only half duplex. Also when you change between 485 ADP and 485 BD you will have to re-wire the cable, as the pin allignment of the connector is different ~whipperSnapper

Share this post


Link to post
Share on other sites
Hi, It is necessary to connect A-circuits to plus and B-circuits to minus as shown below, because a japanese specification is inverse: RDA to TX+ RDB to TX- SDA to RX+ SDB to RX- GND to GND This is true information and it should help you. Here is a program example Also you need to exclude the setting of the send message flag M8402 while the answer has been not recieved yet. Regards Edited by Inntele

Share this post


Link to post
Share on other sites
Inntele, I think your example program helped me. whipperSnapper, thanks for the tip! I will keep that in mind. @ the rest! Thanks for the teamwork. Appreciate all your input. Edited by LeDude

Share this post


Link to post
Share on other sites
Don't mention it, we are always glad to help But for money we ready to help completely disinterested You did the serious mistake in you variant of program. If you set M8402 continiously when M1 is ON, you'll have a conflict between the message sending and the message recieving. You have to set M8402 only if the communication channel is free. Good luck Edited by Inntele

Share this post


Link to post
Share on other sites
Hi guys, I am back! :D Damnit, posted already in another thread, but to keep everything together: The program still works, but now I programmed the drive to send me back feedback. Basically I send MA 300 (Move to absolute position 300 steps). Once the drive reached its position it sends me P=300. So this way I know it reached its position. The issue I am having is, that the PLC (FX3u32M + FX3u-485ADP) does not receive anything. I guess the code above only sends, but is not able to receive? Check the attachment and tell me what you think and what I shall do to make it work. Cheers guys! Without this forum I would never be where I currently am. I learned a lot from you. RS485.zip

Share this post


Link to post
Share on other sites
When you got an incoming message from MDrive, M8403 bit indicate it. But you are reset immediately this bit in the beginning of scan, and below you do it again.

Share this post


Link to post
Share on other sites
I changed it, still no go. The RD light on the 485ADP never lights up, only the SD. It is wired correctly, and I changed the code in a way in which it works with my 232ADP. Of course I changed the channel, otherwise the drive would receive commands and actually move. ;) I am desperate... Edited by LeDude

Share this post


Link to post
Share on other sites
LeDude, About structure from 3219 step. You use the inverse M8000, therefore 0D0A symbols are not added to the message. About structure from 3295 step. You use M8000 instead of M8003, therefore the RS2 instruction will not initialized in first scan. Because your program has not comments, it is impossible to understand what you like to do... To use X device inside of program is bad habit too.

Share this post


Link to post
Share on other sites
What do you mean by 'to use X device inside program is a bad habit'? How else are you going to read an input?

Share this post


Link to post
Share on other sites
Dear Crossbow, At first lines in the program should be a copy all inputs into markers. The main goal of this is allow to write simulator for equipment that is controlled by program, because is impossible to assign value for input. It relates to a culture of programming the same as writing comments, and it must be the rule for any program, even which will not contain a simulator.

Share this post


Link to post
Share on other sites
To make things easier I am using a little switch to trigger the commands - so the X device will be gone once I am done. ;)

Share this post


Link to post
Share on other sites
LeDude, I did the example only, because I didn't know what do you want to do with the answer, therefore M8403 resets itself in the beginning. About first scan is written in manual and it is right way to prohibit the RS instruction at first scan. It's important for good work of communication. If your program works with 232ADP, but does not work with 485ADP, is important whether you change the setup of port. The setup for 232 and 485 is different. If you do it, perhaps is need to change A and B connection.

Share this post


Link to post
Share on other sites
Sending works with 232ADP and 485ADP. It is only the receiving which does NOT work with the 485ADP

Share this post


Link to post
Share on other sites
So here i have a most basics: M1 rites MA 1111 in D1 M11 sends Ma 1111 which is stored in D1. So how would you receive? 485.zip

Share this post


Link to post
Share on other sites
I understood it. But this may be associated either with the port settings or with the polarity of the line. You spoke about SD LED is lit only and not spoke that MDrive performs command. If MDrive performs command, the problem is not associated with a line's polarity.

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