Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - nealbert

Pages: [1] 2
1
Technical support / Re: Unwanted Stepper motor movement
« on: September 14, 2020, 10:03:14 AM »
Gary,

Your last sentence nailed it...the 0-5VDC logic input to the stepper driver.  I'm probably using the same $6 Chinese stepper drivers as you and I had 24VDC going to the stepper driver inputs.  Dropped in a 1K resistor into the Clock wire, got a solid 0-4VDC logic input.  Jumping and jerking disappeared.  Everything nice and smooth when the SSRs turn on now.  My machine has been running for 1.5 hours and has completed 273 up/down cycles.  It stops with 0.001" of the Home position every time.  Color me happy.

I should have thought about this.  Had to do the same thing on some Oriental Motor drivers.  (But, you don't have to add a resistor to Anaheim Automation drivers.)  Guess I should have looked at the data sheet more carefully.   Oh yeah, parts are from China.  No data sheets!

Anyway, thanks a lot for the help and for jogging my memory.

Neal

2
Technical support / Re: Unwanted Stepper motor movement
« on: September 13, 2020, 04:44:29 PM »
I agree, I think it's time to break out the scope.
Gary,

I should have attached this video in my initial post.  It shows the elevator movement to "Home", there is a 2 second pause, then the SSR are turned ON (you can see {on the dial indicator} and hear the "jerk" at about the 00:04 second mark).  You may need to turn up the volume on your PC to hear the "jerk".  Sorry for the poor video quality, but when you're limited to a 512KB upload, somethings gotta give.

I'll also disconnect the SSRs one by one and see if one Output is worse than the others.  If the problem is coming from Output Channel 4 (the one right next to Stepper Clock Output), then moving that one channel to Output 7 or 8 might solve the problem.

Any new ideas after seeing the video?

Thanks,
Neal

3
Technical support / Unwanted Stepper motor movement
« on: September 11, 2020, 08:37:10 AM »
I have a FMD88-10 PLC and am using the Stepper motor output to move a small elevator.  I also have three 24VDC Solid State Relays wired to PLC Outputs 2, 3 and 4.  These SSRs drive 3 heaters but they are disconnected for now, so it's just SSRs wired to the PLC.

I issue a move command to move the elevator upward.  It moves up, stops where it's supposed to, pauses a couple of seconds, then the 3 SSRs turn on.  At that point I see and hear a jump or jerk of the Stepper motor.  Sometimes a strong jerk, sometimes weak, sometimes not at all.  Note, this occurs when the SSRs turn ON, so it is not related to an inductive kick when inductors turn off.  The jerk motion is actually moving the stepper motor.  Over time, the elevator inches upward away from it's original stopping point.  This is unacceptable.

I have not looked at the output of the PLC (Output 5) on the o'scope yet.
I installed a small ferrite bead on the wire from PLC Output 5 and the Stepper Driver, but that didn't seem to have any effect.
I have some UF4001 diodes (as suggested in the FMD88-10 Users Manual) on order, but won't have those until next week.

Looking for solutions or suggestions at this point. 

Thanks in advance,
Neal Cooper

4
Technical support / FMD88-10 and UL 61131-2 and UL 60730-2-9
« on: April 13, 2020, 12:27:36 PM »
Can someone please tell me if the FMD88-10 conforms to UL Standard UL 61131-2  OR  UL 60730-2-9 ?   I've designed the FMD88-10 into a vending machine where the PLC controls a cooking device.  The UL representative is telling us that the FMD88-10 MUST comply with one of the above Standards per UL Standard UL-197 (Standard for Commercial Cooking Appliances), or we can't use it.

Thanks,
Neal Cooper

5
Technical support / Re:Perplexed by puzzling parentheses pecualiarity
« on: March 06, 2019, 01:37:21 PM »
Gary, et al,

Thanks for the explanation.  I totally forgot I'm working with Integer math.

The conversion equation works fine without the extra parentheses and the client is happy now.

I'll keep in mind the methods you describe to increase accuracy.  I may need that some day.

Thanks again,
Neal Cooper

6
Technical support / Perplexed by puzzling parentheses pecualiarity
« on: February 18, 2019, 03:26:21 PM »
I'm not sure if this is a bug or a feature, but I'll throw it out there for your consideration....

In my FMD88-10 I have a Custom Function that takes an incoming analog voltage, scales it and converts the voltage to a temperature.  The last step in my CF is to convert the temperature from degrees C to degrees F using the commonly known equation:

F = (C * (9/5)) +32

Great, right?  WRONG!  The unnecessary pair of parentheses around the "9/5" causes the TBasic to yield an incorrect answer.
At room temperature (25C), the above equation yields and answer that's 17F degrees low.  At a temperature of 200C, the answer is over 150F too low.

What I know is...
  • That the "()" around the "9/5" is unnecessary.  
  • That "F = (C * (9/5)) +32" is mathematically identical to "F = (C * 9/5) +32".
  • That with or without the "()", the above equations will yield the identical answers when calculated in a spreadsheet, with a hand calculator or using simple pencil and paper.
So, the question is... why does TBasic yield an incorrect answer when unnecessary "()" are there?  Shouldn't it just ignore them?

7
Technical support / Re:Stepcount() and stepcountabs()
« on: May 21, 2018, 08:25:26 AM »
Gary,

Thanks again for the great feedback.   We took the easy way out this time and just overnight an FMD88-10 to my client that had working code in it.  That'll get my a$$ out of the fire for now.

I think you hit the nail on the head about the software version  I installed the version on their laptop when I was out there a couple of months ago.  I used the Trilogi Started Kit DVD so it's an older version than what I'm using here in my office.  Oops.

Guess It's time I learned how to log into a remote FMD88-10 to upgrade software.  Always something new to learn.

Regards,
Neal Cooper

8
Technical support / Re:Stepcount() and stepcountabs()
« on: May 17, 2018, 01:09:33 PM »
Gary,

Thanks again for the feedback.  You obviously did not get this wealth of information from reading the Trilogi online documentation.  I'm glad you know this stuff.  You should write a book  ;-)

I have been bitten by the 16/32 bit stuff.  And yes, it is hard to debug.  That's why  I wanted to make sure what size word it is before I shoot myself in the foot, again.

Strangely, today I do not get the "unknown keyword" error when I put the statement "DM[1] = stepcount(1)" in my CF.  I'm positive I was typing it correctly the other day,  so who knows.

On a related topic, I was trying to download software in to a clients PLC in Los Angeles today (I'm in Dallas, TX) and I got the "unknown keyword" error on a relay name that has been in my code almost since day one.  The exact same version of software download to the PLC in my shop yesterday with no problems.  But today, 600 miles away..."Unknown keyword".  I'm going to send them a newly saved file and just chalk this up to sun spots or ebola or that wild & crazy Vlad Putin hacking my computer.  Unless, of course, you have a any suggestions.

Thanks,
Neal Cooper

9
Technical support / Stepcount() and stepcountabs()
« on: May 15, 2018, 12:59:45 PM »
How do I use the functions STEPCOUNT(X) and STEPCOUNT(X) in a CF?  The documentation only says this function returns the relative (or absolute) number of step moves.

There are no examples in the documentation, so I assumed I just need a simple equality in oder to use the value that STEPCOUNT returns.  Something like....

DM[1] = STEPCOUNT(1)   or    A = STEPCOUNTABS(1)

Is this correct so far?

If it is, then why do I get Error : unknown keyword:"stepcount"  (or "stepcountabs") every time I run Simulation or try to download my program?

Also, is the number that is returned 16 or 32 bit?

Thanks in advance,
Neal Cooper

10
Opinions & Feedback / Unwanted "features" in TL6
« on: May 14, 2018, 04:19:04 PM »
I've documented a couple of "features” in TL6 (V6.52, build 5) that are somewhat annoying.  I'm surprised that nobody has complained about them before.  The "features” exist in TL7, too.

Both of these "features" show up when printing hard copies of your Ladder Diagram, I/O Tables and Custom Function.

The first problem is that the date printed in the Header on each page is 1 month off.  The day and year are correct, but the  month (shown in the Header and printed) is the previous month.  The problem is NOT originating from the computer.  I’ve installed TL6 on 3 computers with the correct BIOS date and the problem is on all 3 copies of TL6.  If you have  a good monitor and good eye sight you can see the incorrect date in the Print Preview screen.  

The second had me thinking I was losing control of my documentation skills.  I tried typing an explanation but it got so wordy that I decided an example describes the problem best.  But, it’s still somewhat wordy......

First, let’s assume that you save your TL7 files using sequential filenames as you make significant changes to you code (ie Ladder_1.PC6, Ladder_2.PC6, Ladder_3.PC6, etc)  AND you save your files to a thumb drive, network drive or some location that forces TL6 to print the file path in the Header of each printed page.
 
So, you open Ladder_1.PC6 and make some edits.  Next, you save this modified file as Ladder_2.PC6. Now, you decide to print a copy of the project for your co-worker or customer.  You first print the Ladder Diagram and it comes out fine.  The Header says “Page 1  Z:\Ladder_2.PC6”.  Good, the Header matches the filename.  (Of course, the date is still  1 month off.  Aaargh.)

So you go ahead and print the I/O Table and Custom Functions.  But, to your chagrin, the filenames in the Header are WRONG!  The filename in the Header is from the previously opened file (Ladder_1.PC6).  And, the date is a month off.  Double Aargh!  This can really screw up your documentation.

I’ve created 3 small projects with sequential filenames (Ladder_1 thru Ladder_3) and attached them.  I inserted the filename of each project as comments in the Ladder Diagram and in ALL Special Functions.  I also named Relay 3 in each project with the corresponding filename.   I am able to print each project and verify that the data (Ladder diagram, I/O table and CF) that is printed is correct and only the filename in the Header is wrong.  The 3 projects are attached if you want to verify this.  Also, like the incorrect date, the incorrect filenames can be read by clicking on Print Preview.

Neal Cooper

11
I was reviewing some of the information on your TBASIC Custom Function Help site (http://www.triplc.com/TRiLOGI/Help/tbasic/tbasicIntro.htm) and noticed that some of the images do not show up.   I pulled up the same page on another computer and the same images are missing.  And it doesn't seem to matter if I'm using FireFox, Chrome or Internet Explorer...the images are missing in all 3 browsers.

Primarily, the missing images are located in sections 1. Overview through section 2.3 Search/Find.  I did not read thru every topic so there may be more.

Just thought you'd like to know.

Neal Cooper

12
Technical support / Re:Stepper motor homing sequence not behaving
« on: May 10, 2018, 02:37:54 PM »
Gary and Lorne,

Thanks again, y'all are great.

Gary, thanks for the description of servo motion operation.  We discussed servo motors during our initial designsessions but I thought it would be more difficult and costly to implement.   I appreciate the link to the low cost servo.  I'm going too buy one so I can get familiar with their operation and control.

Lorne,  thanks for the code.  I've printed it out and at first glance it looks very similar to my code. (I can't seem to upload a *pc6 file).  I hadn't thought about adding a timer to the circuit to prevent changing directions too quickly.  On my HMI I have grayed out some of the buttons to prevent "operator induced accidents".  For instance, on my Manual Control screen, when the door is closed (all the way up) the button labeled "CLOSE" is grayed out so the operator cannot try to close the door more.  Also, in the HMI I have put limits on the numerical inputs so the operator cannot input step values that exceed the maximum step travel of the door..

I'm trying to make operation of this machine "fool proof", but as you know, the fools keep getting more creative and ingenious.

Neal  

13
Technical support / Re:Stepper motor homing sequence not behaving
« on: May 08, 2018, 04:47:19 PM »
Gary, Lorne,

Sorry for the slow response, but I've been out of town for the past week taking care of some family business.  Anyway, thanks for the feedback and suggestions.  I did install a counter balance system to the door just before I went out of town.  This solves the problem of the door dropping like a rock when we lose power.  But, As y'all pointed out, it also lightens the load on the motor while moving (less chance of missing steps) and while holding the door closed (less chance of motor burn-out).

Right now there is only one limit switch and it is tripped when the door is closed.  The operator must Home the door one time when he/she first powers up the machine.  After the initial "Homing" I ignore the Limit Switch.  Since I am running open loop that is is a bit of a risk that the motor could miss a step or two.  If we find that the door loses steps then I could make the door "re-home" every time it closes.

So far the machine is working fine without a second Limit Switch (at the fully open position).  During operation, the door is never fully open.  The door is either fully closed or in some intermediate position between open and closed.  I might add a Limit switch to the fully open position just as an indicator that there was a mechanical failure ( belt broke, motor died, etc).

This machine is a prototype so we have lots to learn about it's performance.  But, just in case, I've already purchased a second stepper motor with a brake and a third stepper motor with a 50:1 gear box.  Better safe than sorry.

Neal

14
Technical support / Re:Stepper motor homing sequence not behaving
« on: April 25, 2018, 02:14:04 PM »
Gary,

Thanks for the feedback.  I took your suggestion and inserted "While TestIO(Limit_Switch) = 0" in place of my "While Input[1] = 0"  Unfortunately, that didn't work either.  Hitting the Limit Switch did not stop the stepper motor.  So, taking your bullet points into consideration I re-wrote the code as attached.  This DOES stop the stepper motor when ever the Limit Switch actuates.  Hooray.

Basically, I separated the different functions into multiple CF's.  STEPSPEED is now defined in the Initial Scan.  STEPSPEED and SETSTOP/STEPHOME are in their own CF.  No more polling an INPUT from within a CF.  I also got rid of the While loop which was causing problems before.

I was planning on adding another STEPMOVE command to traverse my door quickly towards the home position, then slow down as the door moves towards the Limit Switch.  Fortunately, in my application the door is already moving slowly and is also moving against gravity, so when the stepper motor stops, the door stops very quickly.  My biggest concern was overshooting the Limit Switch due to system inertia and encountering a hard stop.  I never considered the voltage spike that could be generated by a high inertial load over-driving a stepper motor.  I have not encountered that, yet, but it's good to know.

Thanks again,
Neal Cooper

15
Technical support / Stepper motor homing sequence not behaving
« on: April 23, 2018, 01:32:33 PM »
I wrote a little stepper motor homing routine and have found that it's implementation is anything but routine.  My application is a small vertical elevator that is moving a door.   When my device is at rest (everything de-energized) the door is at the bottom of travel (due to gravity) and is fully open.  When I energize the device, the first thing the operator needs to do is home the stepper motor.  (For safety sake I chose to force the Operator to start the Homing sequence by pressing a button on the HMI rather than initiating an unannounced homing sequence when the device is powered up.)   In this case Home means the door is fully closed.  The stepper motor needs to drive about 400 steps to close the door.  The number of steps is approximate due to manufacturing tolerances and the presence of a soft gasket on the face of the door.  Hence, the need for a homing/limit switch.

The routine I wrote is in the attached "Homing.pc6".  My idea was that I would start the Homing sequence by touching a button in the HMI (Relay1 or Start).  This starts the "Homing" Custom Function. I first set the step motor speed using the STEPSPEED command, then jump into a while loop that is running the STEPMOVE command.  I would exit the While look as soon as the door tripped a limit switch (Input[1]).  Once I exit the While loop, I issue a STEPSTOP command to immediately stop the step motor, then follow that with a STEPHOME command to set the new Home position.  At least in theory it sounded good.

Even on the iTrilogi 6 Simulator everything looks good.  Clicking on Relay 1 starts the stepper motor.  Clicking on Input 1 stops the stepper motor.  Great.   EXCEPT, I discovered that clicking on ANY input, stops the Stepper motor.  Hmmm! ???

So I moved to the hardware and discovered JUST THE OPPOSITE...The step motor starts like it should when I activate Relay 1 via the HMI.  However, closing the Limit Switch/ Input[1] (or any Input) does nothing.  The step motor keeps on going until it reaches a hard stop.  Or, you cut the power.  Ouch!

The Simulator and the real hardware do share one common trait...if ANY Input is closed when I hit the START Button (Relay 1) then the Step motor will NOT start.  Well, I guess I can throw out my Normally Closed E-Stop!

I've tried this code on iTrilogi versions 6.47 build 05, 6.52 build 03 and 6.52 build 05 and get the same results on all 3 versions.

I'm open to any and all suggestions.  I'm not too worried that the Simulator and the real world don't behave the same.  It would be great if they did, but I can work around that.  The main thing I need is a working, repeatable, reliable Homing Sequence.   At his point I don't know if most of my problem is with my logic or the software.  

Pages: [1] 2