You are not registered yet. Please click here to register!


 
 
plc storereviewsdownloads
This board is for PLC Related Q&A ONLY. Please DON'T use it for advertising, etc.
 
Try our online PLC Simulator- FREE.  Click here now to try it.

---------->>>>>Get FREE PLC Programming Tips

New Here? Please read this important info!!!


Go Back   PLCS.net - Interactive Q & A > PLCS.net - Interactive Q & A > LIVE PLC Questions And Answers

Reply
 
Thread Tools Display Modes
Old April 13th, 2020, 07:39 PM   #61
TheWaterboy
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
 
TheWaterboy's Avatar
 
Join Date: May 2006
Location: State of Denial
Posts: 1,025
not really, but kinda - ideally I would hash this array for complete detection but this was enough fun for one day.
  Reply With Quote
Old April 14th, 2020, 02:29 AM   #62
GaryS
Member
United States

GaryS is offline
 
GaryS's Avatar
 
Join Date: Aug 2003
Location: Lancaster Pa.
Posts: 1,299
Here's 2 examples of doing what you want
one uses the FAL the other uses just a loop
i like the loop better is simpler to setup
Attached Files
File Type: pdf Array Add.pdf (14.2 KB, 10 views)
  Reply With Quote
Old April 14th, 2020, 10:50 AM   #63
TheWaterboy
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
 
TheWaterboy's Avatar
 
Join Date: May 2006
Location: State of Denial
Posts: 1,025
I'm using the first one and I wonder which one of those options is faster. If I get time I'll test that.
  Reply With Quote
Old April 14th, 2020, 12:18 PM   #64
kamenges
Member
United States

kamenges is offline
 
kamenges's Avatar
 
Join Date: Nov 2002
Location: Brillion, WI
Posts: 4,034
My guess is the FAL solution will solve in less processor time simply because it is a firmware solution. The function has been optimized for use in the target. But I have been wrong before.

Keith
  Reply With Quote
Old April 14th, 2020, 08:04 PM   #65
chelton
Member
Australia

chelton is offline
 
Join Date: Jan 2012
Location: melbourne
Posts: 105
It works yes. Is it the correct use of the instruction?
Here's how it would have been done on a PLC5, you can see from the usage that N7:70-99 become marked as used because of the length of the FAL


PLC5_FAL.PNG

Converting this to Logix produces this:
An Alias is created automatically pointing to N7[0].Pos


LogixConversion_FAL.PNG

Tidying it up without the conversion tags.


Logix_FAL.PNG
  Reply With Quote
Old April 14th, 2020, 08:11 PM   #66
TheWaterboy
Lifetime Supporting Member + Moderator
United States

TheWaterboy is offline
 
TheWaterboy's Avatar
 
Join Date: May 2006
Location: State of Denial
Posts: 1,025
I know that will work but how do you know it's better... or more correct maybe... to use the offset in the expression instead of loading it into position element?

It's cleaner on the rung to be sure but that doesn't mean its right or wrong.
  Reply With Quote
Old April 14th, 2020, 08:31 PM   #67
chelton
Member
Australia

chelton is offline
 
Join Date: Jan 2012
Location: melbourne
Posts: 105
Quote:
Originally Posted by TheWaterboy View Post
I know that will work but how do you know it's better... or more correct maybe... to use the offset in the expression instead of loading it into position element?

It's cleaner on the rung to be sure but that doesn't mean its right or wrong.
More correct because the FAL can do much more. If you had a temperature data array[100] and you want to convert 30 temperature values from Fahrenheit to Celcius and store them back in the array you could do something like this, where the destination is part of an array.


Temp_Conversion.PNG
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Topics
Thread Thread Starter Forum Replies Last Post
Practice: very first post: on EtherNet/IP solution Productivity PLC and ML1100/1400 GBolin1972 LIVE PLC Questions And Answers 4 August 31st, 2018 11:28 AM
FTV ME and 144 element array? dginbuffalo LIVE PLC Questions And Answers 5 January 23rd, 2018 06:20 AM
Part rejection down line Bob O LIVE PLC Questions And Answers 51 October 28th, 2004 09:20 AM
Building an S7 Array Move Questions DesertDog LIVE PLC Questions And Answers 19 June 17th, 2004 10:51 AM
help with a sorting problem Thyrn LIVE PLC Questions And Answers 37 May 2nd, 2004 01:37 PM


All times are GMT -4. The time now is 04:43 PM.


.