
Chevyfan4life (Customer) asked a question.
Hello, I recently purchased a P1AM-100 PLC as a more industrial solution to the Arduino I am currently using. I am using it to control a stepper motor driver which in turn, runs a stepper motor. The program has been rigorously tested on the Arduino and works flawlessly. I added a line of code at the top of the program to include the library for the P1AM-100 and I changed the board from Arduino Uno to P1AM-100. When I go to run the exact same code that was just running on the Arduino, nothing happens. If possible I would like to troubleshoot this with someone who is more experienced with the P1AM-100 than me. Code File and Pics Attached. Thanks!
Hey Chevyfan4life,
Could you post some pictures with your wiring and general setup?
Thanks
Adam
HI Adam,
There should be a word doc attached with the code file I am using as well as 5 or 6 pictures of the wiring.
I see now, they must not have loaded for me the first time.
What model stepper driver are you using? Do you know the voltage levels and current requirements for the DIR and PUL pins? The P1AM-100 uses 3.3V logic and can only supply 7mA from a GPIO.
Hi Adam,
I am a mechanical engineer who was tasked with this electrical project so I've been doing a lot of learning as I go. The driver is a DM860T from stepper online. (https://www.omc-stepperonline.com/digital-stepper-driver-24-72a-18-80vac-or-36-110vdc-for-nema-34-motor-dm860t.html?search=DM860T) Here is the datasheet (https://www.omc-stepperonline.com/download/DM860T.pdf) From what I can tell the DIR and PUL pins use a 7-16 mA signal for the logic. From what I can tell it also 4-5 volt but this is less clear. Any recommendations are appreciated.
I think the control signals are the issue in this case. We would be right on the edge of the minimum power requirement: 7mA. It needs a 4-5V signal per the datasheet for a HIGH logic level which we cannot provide directly from the P1AM-100. It also has internal current limiting resistors which further limits the current we are outputting.
A couple potential solutions to this:
Thanks
Adam
I'd recommend the transistors. In my experiments the fastest I could get from a P1-08TD2 was 725Hz, more than an order of magnitude slower than the speed in the example:
"int topValveMotorSpeed = 8000; // steps per second"
at 725Hz "int endPosition = -8125" will take over 11 seconds
Another thing one might try (though in this case I would NOT recommend it) would be to add a pull up resistor to +5V. since the P1AM-GPIO " pins include basic overvoltage, undervoltage, and overcurrent protection."
Key there is "Basic", since your stepper drive needs several milliamps the resistor might have to be too small to be safe (or work at all) with the "basic" protection. I have done that with a 5V LCD display that had, I think, 10K pull-ups, However, 10K will not operate the optocouplers in your drive.
I am coming across the same issue. Were you able to make it work?