1/9/2024 5:05 PM | |
Joined: 11/9/2023 Last visit: 1/11/2024 Posts: 8 Rating: (0) |
Hi All, I am very new to the Logo! and recently posted about using it for some stepper motor drives. For this program I need to turn on the stepper motors for 180 degrees then stop the motor for 20 seconds before it repeats the process. I had originally tried using this through counting the pulses through the PWM but could not find a way to only send 100 pulses so I have tried to pivot to using an Automation Direct normally closed proximity sensor (DW-AS-614-M18-002) and SureStep Motor and Driver (STP-MTRAC-34156andSTP-DRVAC-24025). I have gotten the Logo! to turn on and off the motors using the C1 a pulse relay and a PWM to Q1 (Which can be seen in the 2 modified versions, but it will only let me upload 1 image). I tried modifying this program in 2 ways (The C2 and I2 should be C1 and I1 it just shows my two modifications in one image) to get the sensor to act as a trigger to turn off the motor, but neither of these methods worked. I was hoping someone could help me as I believe it is an issue with how I have the sensor setup. Whenever the sensor is triggered, the lights on the sensor housing are acting as they should (off when metal is present) but I am not sure how to tell if the Logo! is receiving the signal from the sensor to turn off the motor. I may also have a programming error which could be easily fixed and I apologize for the simple questions. I am very new to electrical work in any capacity as my background is completely mechanical. Thank you for all your help AttachmentScreenshots.zip (228 Downloads) |
Last edited by: TJG3D at: 01/09/2024 17:06:46Last edited by: Jen_Moderator at: 01/10/2024 10:41:24All files added as .zip file. |
|
1/9/2024 5:13 PM | |
Joined: 12/18/2014 Last visit: 5/26/2024 Posts: 33107 Rating: (4087)
|
You use the PWM block without knowing of the function of the block ... |
1/11/2024 4:36 PM | |
Joined: 12/18/2014 Last visit: 5/26/2024 Posts: 33107 Rating: (4087)
|
Here a example for the highest speed. |
This contribution was helpful to2 thankful Users |
1/12/2024 6:43 AM | |
Joined: 9/11/2014 Last visit: 5/24/2024 Posts: 727 Rating: (28) |
Hi, OUTPUT frequency: Here examples from SIemens how to get the scantime of a program: https://support.industry.siemens.com/cs/de/de/view/109783502 (Goto scantime in this collection then you find how to get it) Basically LOGO! is not the best controller for fast or real time application. The typical scantime of a LOGO! is <0.1 ms per functionblock. If you have used all 400 function blocks in a LOGO! Program, then the theoretical scantime is 40ms. If you need output signals, then with relay outputs this frequency is much to fast for a relay. According to the LOGO! Manual the max output frequency is: for relay outputs: 2Hz at ohmic load Input frequency: If there is a additional functionblock between the fast input and the up/down counter, then the it also depends on the LOGO! scan time. For fast and/or real time application better to use S7-1200/1500. This controller can create a much faster output signal and can read much faster input signals. Hope this helps. |
1/13/2024 7:38 AM | |
Joined: 10/15/2022 Last visit: 5/19/2024 Posts: 66 Rating: (2) |
Hello I have made one sample program to test pulse rates. There are three frequency and pulse counters. The first one (A) is cycle time dependent, the second one (B) uses an asynchronous pulse generator whose times can be changed and the third one (C) counting pulses from input I3. By default the operation lasts 10 seconds. This time can also be changed. ESC+Arrow_Up key triggers the timer, ESC+Arrow_Down key resets it and the all counters. The operation of output Q3 can be enabled/disabled with ESC+Arrow_Left key. The output (relay) blinked pretty crazy (10 ms on, 10 ms off in case). This is controlled by an asynchronous pulse generator (B). Counter C taking readings from input I3, where Q3 is connected with external wire. The frequency of pulse counter A even depends on whether or not you are also online at the same time. I managed to get a pulse rate of about 1535Hz (without being online). For pulse counter B, it was 50 Hz (can generate up to 100 Hz). The program has been tested on a 12/24V controller 6ED1052-1MD08-0BA1 with relay outputs. In simulation I had much lower numbers (maybe it depends on the speed of the computer itself). Even though the relay may operate faster than stated on the data sheet, it should still be within the permissible limits. Andrus P.S. I've been playing with an "Eaton easy4" controller with transistor outputs (E4-DC-12TC1). Its two outputs do support PWM (up to 200 Hz) and are able to output pulses (1:1 ratio , up to 5 kHz). The latter can be used to control a stepper motor (via the motor driver). * Translated with DeepL.com (free version)
AttachmentPulse_test_demo_V8.zip (154 Downloads) |
Last edited by: Andrus_Saar at: 01/13/2024 07:43:05Last edited by: Andrus_Saar at: 01/13/2024 07:51:27Last edited by: Andrus_Saar at: 01/13/2024 08:07:44 |
|
Follow us on