LE BERRE Posted March 29, 2020 Report Posted March 29, 2020 Hello, I'm trying to make a RS485 connection between a SAMBA + a V100-17-RS4 and a ASD-B2-0421-B (Servo motor). I listened all the webinaire in french I found like this one : For the moment that did not work very well and I do not know if the problem come from the servo motor or the connection or the progam of the SAMBA. It is my first program with Modbus in Samba. That is why I am not sure of my program. The problem can come from the servo parameters or from the Samba parameters. I join the manuel user : www.deltaww.com › Manual › DELTA_IA-ASD_B2_UM_EN_20141217 Thank you for the answers.
MVP 2023 Joe Tauser Posted March 29, 2020 MVP 2023 Report Posted March 29, 2020 I've done a project using a Delta servo and a Vision. The entire controller is manipulated via a Modbus table. To that end, the first thing you have to do is establish first contact with the servo via RS485. Try to read the firmware version from the drive at holding register 0. It is a single 16 bit register. Also - post your PLC program here so we can have a look at your communication routines and also post a schematic of exactly how the Samba is connected to the servo system. Joe T.
LE BERRE Posted March 30, 2020 Author Report Posted March 30, 2020 Hello, I tried to get a answer from the register 0. It is always the same answer from the SAMBA. Normaly DW7 is egal to DW8 if the PLC get a answer from the servo. I don't know why, I think I have a parameter probleme. test.vlp
sgull Posted March 30, 2020 Report Posted March 30, 2020 Hi LE BERRE MI36 is set to 0. I think this is the number of registers you want to read. What is shown is that you want to start at register 0 and read 0 registers and store them in MI24 Change MI36 "read value length" to a fixed number and see what happens. Also be sure that the plug that you use to connect the devices uses pin 1 and 6, most cables of this type only use pins 2,3 and 4. Check your communication settings, in the program you are using slave ID=7 and in the attached picture the address 0x0077 Parity and all port settings must match on both ends. Regards Denis
MVP 2023 Joe Tauser Posted March 30, 2020 MVP 2023 Report Posted March 30, 2020 There could be a number of problems with your PLC program if you haven't done Modbus before. For example, you have a timer with a 0.1 second preset in your screenshot. To me, it looks like you are pinging the servo at 0.1 second intervals, which is too fast for RS485 Modbus. Please attach your .vlp file to a forum post so we can get a better idea of what you're doing. Joe T.
LE BERRE Posted April 1, 2020 Author Report Posted April 1, 2020 Hi Denis and Joe Tauser, I listen you and I have a answer from the Samba. I made a program which is switching the adress port ID and save the register which is answer. Its is all right for the moment. I try to change the resgiter value with RS485 for the moment that do not really work well. In attach you will find the program which is scan the port ID. Regards Kevin test RS485.vlp
LE BERRE Posted April 1, 2020 Author Report Posted April 1, 2020 Hi, When I make a sending message to the register I read before. Then the servo driver send a alarm to his HMI( AL019). Normaly I had the same communication parameters for send a message or read a answer. I do not understand why the servo driver react like this. I give you my code. Thank you Kévin test RS485.vlp
sgull Posted April 1, 2020 Report Posted April 1, 2020 Hi Kevin I would suggest that you call the read and write sub-routines in your program continuously. Conditional calling of sub-routines sometimes gives unexpected results. Try increasing the time on TD0, everything is trying to happen too fast. On you RHR 3 block you are reading 2 values and sending them to MI3. This will store one value in MI3 and the second in MI4. However you are using MI4 in the same block to show the status. Be careful of this, if you are reading several values you must allow enough room to store them. Visilogic will not automatically reserve the space for you. I you are going to read more than one value try to do it on one read. for example if you need address 1, 5 and 7 on the device, it is better to read 1 and set a length of 7 than to try to read using 3 separate reads. It works out much faster and you can just ignore what you don't need. When reading and writing in MODBUS try to set up a sequence. Set a bit perform a read or write using a positive transition contact of the bit and use this to set the bit for the next action. Continue this to complete all the read/writes and at the end reset every thing and start again. Start read - Set MB1 Positive transition MB1 - Read first piece of data and set MB 2 Positive transition MB2 - Read second piece of data and set MB 3 Positive transition MB3 - Write first piece of data and set MB 4 ETC. when all data is pooled reset all MB and start again. You are writing the value to MI6 in the modbus data block, did you intend to display this on the write screen? Regards Denis
MVP 2023 Ausman Posted April 2, 2020 MVP 2023 Report Posted April 2, 2020 I feel the need to add something to Denis's comment "if you need address 1, 5 and 7 on the device, it is better to read 1 and set a length of 7 than to try to read using 3 separate reads." On many devices I use, this is not possible. If the device itself doesn't have any knowledge or use of any register involved in the vector, it will often return an error. Many, many times I have to do separate reads on a single device to get all the info I need because of this quirk. It is a complete PITA, as the makers often spread the "most relevant to what the sensor does" registers many numbers apart, with gaps in b/n. Air sensors with temp at 013, Hum at 121, CO² at 217 ....... instead of all 3 in registers 2, 3 & 4; with the rest of the useless to the user garbage that they use internally but for some reason have them as register usage, placed everywhere else but often with number gaps. You get the idea. I'd really like to give the people who make the devices a big smack on the bottom and then send them to the dunce corner for the day. With NO coffee or chocolate allowed at all for the rest of the month. The vector method is certainly much faster, but you can only do it after initial testing using the PC to see if it is "actually" possible. cheers, Aus
LE BERRE Posted April 3, 2020 Author Report Posted April 3, 2020 Hi, I suspect the thread is not as the servo driver would like. That is why I modified the theart parameters and the read again and I do not have any answer. I do not have any possibility to watch the thread to verify the communication. I will try to build the protocol that could make me sure that the thread is good. Regards, Kévin
MVP 2023 kratmel Posted April 3, 2020 MVP 2023 Report Posted April 3, 2020 You can use delta software http://www.deltaww.com/services/DownloadCenter2.aspx?secID=8&pid=2&tid=0&CID=06&itemID=060201&typeID=1&downloadID=B2+Series&title=B2+Series&dataType=8;&check=1&hl=en-US and try to check data flow from and to drive via SAMBA port monitor in SAMBA info mode. But i do not know about delta software connection to the drive. If it is via RS485 - you can use SAMBA for monitoring.
LE BERRE Posted April 3, 2020 Author Report Posted April 3, 2020 Hi, I have this software, it uses the same connection as the port RS485 but the software communicates via RS232. I want to modify the speed of the motor with the samba with RS485.In fact I have a machine with two of this servo driver and the speed is a value used for the good functioning of the machine. The operation must be this one : someone writes the speed on the HMI of SAMBA and SAMBA modifies the speed of the driver. Regards, Kévin
LE BERRE Posted April 4, 2020 Author Report Posted April 4, 2020 Hi, I find the answer. My problem come from 16 bits and 32 bit. I tryed the send a 16 bits value to a 32 bits register. Big mistake. I joint my progam. Thank you for the help. Kévin test RS485.vlp
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now