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]
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.

Neal Cooper

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

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?

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

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.

Neal Cooper

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

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.

Neal Cooper

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

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

I was reviewing some of the information on your TBASIC Custom Function Help site ( 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

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.


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.


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

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

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.  

Technical support / Re:SetDimmer
« on: February 19, 2018, 08:57:56 AM »

Thanks for the reply.  I went back to the "SetDimmer" Help screens and finally noticed the asterisk...

*{Applicable only to F-series PLC}

I'll pay more attention next time.

I've got 2 Omron proportional SSR's on order now.  I've also got a RS485 controller light dimmer that I bought a couple of months ago for a backup.  Good for 240VAC, single phase at 16 amps.  It's called a RS485 Leading Edge Dimmer and is made by Krida Electronics.  Gonna wire it up today and see how that works with my 2000 watt IR element.  Only problem is it's size.  At 3.2 x 5.1 x 2.5, it's much bigger than a SSR.  As usual my 5 lb bag already has about 9.5 lb of crap in it.  Aah, that's why they call it Development.

Thanks again,
Neal Cooper

Technical support / SetDimmer
« on: February 16, 2018, 01:05:09 PM »
Help.  I am trying to vary the output of an infrared heating element and it looks like the SetDimmer function might work for that application.  I'm coming out of Output 8 of an FMD88-10, to a SSR, then to the quartz element.  I've created a Function Block with the command "SetDimmer, 4, A" where A = DM[1].  DM[1] varies form 0 to 156 and is controlled by a slider bar on my HMI.  I've tried different ladder and Function Block configurations, but cannot seem to get anything to work.  Output 8 never turns on, no matter what the value of DM[1].

The i-Trilogi Help says SetDimmer "will send a short trigger pulse to the SSR to turn it on".  So, that means, SetDimmer needs to be inside a loop??

I've searched the Forum for "SetDimmer" and found nothing. (Does nobody use this Function??) Can someone please provide some ladder and/or Function Block code that shows how SetDimmer is supposed to work?  Do I need a zero-crossing SSR for SetDimmer to work?

Many thanks,
Neal Cooper ???

Technical support / Change TimerSV with Wientek MT8050iE
« on: October 20, 2017, 09:28:13 AM »
I am using an FMD88-10 and Weintek HMI MT8050iE in an oven application. I have the HMI programmed so the operator can monitor and change the SetPoint Temperature, Actual Temperature, conveyor speed and the condition of various fans.  Changing those values from the HMI is relatively easy since I'm only dealing with integer and Data Memory variables.  But, I have 3 heating elements that operate for different times.  They all turn on together, but turn off at different times. Currently I use the TimerSV that is assigned to each Timer when it's created in i-Trilogi.

I want to have the ability to change the TimerSV from the HMI.  I assume I need to use the SetTimerSV function.  However, according to the TL6 Reference Manual "the new S.V. are only stored on RAM-shadowed CPU flash memory and is normally volatile unless..."  OK, requires an extra step to write the data to CPU flash memory.  No big deal.    However, I get a bit nervous when I read things like "Programmer should therefore use this command sparingly".

On the HMI I would also like to have a "CANCEL" and "SAVE" button to give the operator the option to save the new S.V. values or abort the action.  Pressing the "SAVE" button could trigger a Special Function in the PLC to write new values to the TimerSV.  Can the "CANCEL" feature be implemented entirely in the HMI?
Is there and easier (better?) way to change the SV of a timer from the HMI than using the SetTimerSV function?  According to the Comments in Section 12.73 of the TL6 Reference Manual a "TBASIC custom function can start a timer by setting it's TIMERPV[] variable to any integer value between -1 (reset timer) and 9999 so it is not necessary to change the timer S.V."  Really?  How does that work?  Examples?

Pages: [1]