acisre Posted August 5, 2018 Report Posted August 5, 2018 Hello all, First off, I am a total beginner in plc. Unfortunatly my first project is a little bit on the difficult side, a small machine containing motors and pneumatic cylinders. All communication to the motor is done with CANBUS. Now, I would like to check if a motor is in position. The way I do it now is by reading the position by reading pdo1 every 60ms. Then in my ladder program, I use a compare block to check if the position retrieved is equal to the commanded position. I think this is kind of inefficient because now my program does a pdo rtr constantly every 60ms (to avoid canbus overflow), which is sometimes unnecessary because I only need to know the position sometimes. so my question is, is there a better way to know when the motor is in position? I was thinking about using the 4th bit from the status byte which turns to 1 when the motor is in position? But how to exactly implement this? Do I use a test bit to extract the bit and check it? But is this really better then checking the position via pdo1 and if so why? And how to prevent the CANOPEN buffer to overflow? Right now there are timers in my program which only allow to read or write an instruction every 10ms... is there a better way to do this? Thank you for everyone who can give some tips here. Sven
MVP 2023 kratmel Posted August 5, 2018 MVP 2023 Report Posted August 5, 2018 In my last project, I used Lenze 8400 with embedded CANopen . The capabilities of this driver make possible to prepare "hardware" PDO signal "IN position", "0-position is known", "ACC", "DCC", ect... I did not use timers in the program, but only use system bits SB288, 284, 242, 292 to avoid network collisions . What motor driver used? Maybe it is ready to transfer needed bits or they can be re-assigned manually inside the drive.
acisre Posted August 6, 2018 Author Report Posted August 6, 2018 For the steppers I am using the SMC75 driver from JVL motors. We also have a MAC motor and MIS motor with integrated driver, also from JVL. I don't know if this driver can prepare the signal. If I understand you well, you mean that I can choose what exactly the PDO signal is? So I can change it to be "in position" instead of the actual position? Can you also tell me that if I want to read the status bits, I need a special ladder block to update the status? Or is this done automatically? About the system bits, I have a program with more then 100 rungs. Each of the rungs also has a step counter, so I can only do one rung at a time.. Do you recommend reading that system bit as a NO contact at the beginning of each rung, so I skip it if the bit is low? thanks for the response! (sorry about the many questions)
MVP 2023 kratmel Posted August 6, 2018 MVP 2023 Report Posted August 6, 2018 SMC75 and other JVL driver with CAN offer commisioning software for making application setting. As i see in pdf's from JVL freeconfigurable by software 32bit PDO register present. I don't know your positioning configuration. Is it PDO used for transfer target position? Why step counter is used, when CANopen positioning in different mode present? If it possible post image of project connection (wiring). In my application only isolated CANopen connection OPLC to drive used. Limit switches, home sensor, and jog function switch conected to the motor driver and it's activity sended to OPLC via CANopen. But signals must be preconfigured by driver software and linked to RPDO and TPDO. On the OPLC side struct is used to conect MB array and ML or MI with the CANopen RPDO and TPDO. About SB in ladder. I use it like NO only in CAN transmission rung. In attach i post my CANopen "first steps" realased for samba but without driver side of configuration. CANopen test lenze 8400.vlp
acisre Posted August 13, 2018 Author Report Posted August 13, 2018 Hi Kratmel Thanks for the reply and added attachment, I will take a look at it. Also sorry for the late reply. I will see if I can post an image of the wiring, but I must be careful because an NDA is involved here. The other part of your post is difficult for me to follow.. but thank you very much for all the effort! Sven
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