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

PLC training tools sale

Reply
 
Thread Tools Display Modes
Old October 24th, 2013, 10:00 AM   #1
jasonm
Member
United States

jasonm is offline
 
Join Date: Sep 2013
Location: Washington state
Posts: 6
PLC5 and Factory talk view studio 7

I am using factorytalk view studio 7. I am trying to pull data from a plc5/25, from N10:0 to N10:9 and display this data in ascii format. I am communicating over DH+. I currently can not pull from the online file so I am using the offline file to bring in the tags. On my grafics display in factory talk view I have a string display. What is the correct syntax to read these tags? Length? Can I use HMI tags or do I need to use direct addressing? When I serach my offline rsp. file and bring in the tag it puts it in as a analog type rather than a string type. Any help on helping me out would be appreciated.
  Reply With Quote
Old October 24th, 2013, 10:38 AM   #2
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 13,426
FactoryTalk View doesn't have a good ASCII display mechanism other than its String display.

Is the first word (N10:0) the Length value for the string, or are you just trying to look at a fixed-length of 10 characters ?

Where are you in Washington ? Some of the A-B distributors have really good HMI guys who can help you out with FactoryTalk View.
  Reply With Quote
Old October 24th, 2013, 11:24 AM   #3
jasonm
Member
United States

jasonm is offline
 
Join Date: Sep 2013
Location: Washington state
Posts: 6
I am trying to look at a fixed length of 10 characters.
I am in North Bend, right up the street from you.
  Reply With Quote
Old October 24th, 2013, 02:31 PM   #4
Phrog30
Member
United States

Phrog30 is offline
 
Join Date: Dec 2006
Location: Montgomery, Alabama
Posts: 308
You could try creating an ascii data type in the PLC5, then simply copy N10:0 to Axx:0 length appropriate. The PV+ syntax will be {::[shortcut] Axx:x,Lx} - L is length.

For giggles, create a string display in the PV+ and try this: {::[shortcut] A10:0,L10} - still pointing to N file you have. I have gotten this to work under emulate, not sure if it will actually work on the PLC5. Worth a shot. I do know that creating an ascii data file will work. Tried this on a SLC a few months back, so PLC should work as well.

Let me know, I'm curious.

James
  Reply With Quote
Old October 24th, 2013, 04:02 PM   #5
jasonm
Member
United States

jasonm is offline
 
Join Date: Sep 2013
Location: Washington state
Posts: 6
James,
Seems we would need an enhanced plc5 processor to create the ascii data type. Which we do not have.

I tried your second option. The string display only shows ???????.
  Reply With Quote
Old October 24th, 2013, 04:40 PM   #6
Phrog30
Member
United States

Phrog30 is offline
 
Join Date: Dec 2006
Location: Montgomery, Alabama
Posts: 308
Try dropping the length and see if pointing to one only will work. If that works I can show you how to join all ten. If not, then I have no more solutions for you.

James
  Reply With Quote
Old October 24th, 2013, 05:14 PM   #7
jasonm
Member
United States

jasonm is offline
 
Join Date: Sep 2013
Location: Washington state
Posts: 6
I changed the syntax to ::[short cut]N10:0
In the string display on the PV+ I get 12366. I still need it to be in ASCII format and for a length of 10.
  Reply With Quote
Old October 25th, 2013, 06:25 AM   #8
dmargineau
Lifetime Supporting Member
United States

dmargineau is offline
 
dmargineau's Avatar
 
Join Date: Dec 2011
Location: Midwest
Posts: 2,255
Quote:
Originally Posted by jasonm View Post
James,
Seems we would need an enhanced plc5 processor to create the ascii data type. Which we do not have.

I tried your second option. The string display only shows ???????.
I have just created a new RSLogix 5 PLC5/25 CPU application file; it does not allow String Data Type new files to be added to the project, however, it does allow ASCII Data Type ones.
Within the Offline file, right-click the Data Files folder, choose New and then ASCII Type specifying the number of elements; ASCII data files will show up as Ax within the Data Files folder.
Download and then reference the ASCII type Data File(s) within the HMI application.
  Reply With Quote
Old October 25th, 2013, 01:31 PM   #9
jasonm
Member
United States

jasonm is offline
 
Join Date: Sep 2013
Location: Washington state
Posts: 6
Dmargineau,
Thanks for the help. I got it to work as you stated, but I can not get it to display for a length of 10.
I tried setting the syntax as ::[shortcut]A27:0,L10 nothing shows up in the string display when I write it this way.
When I remove the L10 the data for A27:0 shows up in the strig display on the panel view.
I also have a length of 10 for the sting length under the tag setup.
Do you have any other suggestions to get my length of 10 to show up?

Thanks
  Reply With Quote
Old October 25th, 2013, 01:53 PM   #10
Phrog30
Member
United States

Phrog30 is offline
 
Join Date: Dec 2006
Location: Montgomery, Alabama
Posts: 308
You could try adding a text object. Insert a string variable for {::[xxx]A27:0}, then add 9 more in the same text object for the rest of the addresses. This will create a string, they will just "run" together.

Not sure why the length is not working. You could try adding this as an HMI tag, not direct reference and see if it works. I don't have any way to test right now.

James

James
  Reply With Quote
Old October 28th, 2013, 09:31 AM   #11
jasonm
Member
United States

jasonm is offline
 
Join Date: Sep 2013
Location: Washington state
Posts: 6
Thanks Phrog30,
It does work as you suggested, but that is not how I really want to do it. I was really hoping to use the string display. Hopefully someone can shed some light on how I can get all 10 to display using the string display.

Thanks
  Reply With Quote
Old October 15th, 2014, 07:25 AM   #12
toont
Member
Netherlands

toont is offline
 
Join Date: Sep 2014
Location: Den Bosch
Posts: 53
Maybe my solution also helps for you (1 year later) or others who have this problem:

I have 16 ASCII characters stored in PLC-5 in N68:30-N68:37, now I want to display all 16 in FactoryTalk View String display.
Create a new tag in FactoryTalk View:
Address is ::[shortcut]A68:30,L16 (so ascii type A, not N!)
Type is String, length is 16.
Now you can use the tagname in a String Display object, so no direct referencing. Perhaps direct referencing in String Display doesn't work in this case because length of String is not specified?
  Reply With Quote
Old October 15th, 2014, 04:19 PM   #13
Geospark
Lifetime Supporting Member
Ireland

Geospark is offline
 
Geospark's Avatar
 
Join Date: Feb 2012
Location: Kildare
Posts: 2,129
PLC-5 N Integer File ASCII Data To String Display

Quote:
Originally Posted by toont
...Perhaps direct referencing in String Display doesn't work in this case because length of String is not specified?
Direct referencing should work. Actually, once upon a time it was the only method supported. HMI tags used not be.

As well as the above mentioned, these Technotes, from 2003, say that you cannot use the N File when associating a tag address to a String display or String Input Object...

24651 - String Input and String Display tag address syntax when communicating to SLC or PLC5
Access Level: TechConnect

25921 - N files cannot be used for String Display and String Input Enable objects in FactoryTalk View
Access Level: TechConnect

However, these Technotes, from 2005, now say you can...

32216 - Tag Address Syntax for SLC/PLC5
Access Level: TechConnect

30967 - How to address string tags in FTView Machine Edition from a PLC-5 integer data table
Access Level: TechConnect

It looks like it used not be supported and then it was. So what gives?

Around RSView ME v3.10 or v3.20, the option was added to allow N Files be pointed to as ASCII data locations for the PLC-5 controllers. Also, HMI tags were given support to be used as indirect string data sources.

Where our OP, and perhaps others, were going wrong, was the fact that each 16-bit (N) Integer word stores two ASCII characters, one in each byte i.e. 1 character = 1 byte.

If you have 10 words of ASCII data stored in an (N) Integer File, say N7:0 - N7:9, that you want to associate with a String Display, to display 10 ASCII characters, then this number of words will actually represent 20 ASCII characters. So setting a word length ",L10" will attempt to read 20 ASCII characters from the 10 (N) Integer words. This will not display as intended.

Quote:
Originally Posted by jasonm
...I am trying to pull data from a plc5/25, from N10:0 to N10:9 and display this data in ascii format...I am trying to look at a fixed length of 10 characters...
Each word is not an ASCII character, each byte is. This is incorrectly using 10 Integer words to display 10 ASCII characters. Only 5 Integer words are required.

Quote:
Originally Posted by jasonm
...What is the correct syntax to read these tags? Length? Can I use HMI tags or do I need to use direct addressing?...
You can use either direct addressing, or HMI tags.

Example direct address shortcut to read 10 ASCII characters using 5 words; N7:0 - N7:4:

{::[shortcut]A7:0,L5} (As noted: use A instead of N)

To enter the correct 10 ASCII characters you require, into the 5 Integer words, you change the Radix from Decimal to ASCII for the N File, and enter the 2 ASCII characters required per word, to make up the 10 ASCII characters required in the String Display.

To display the 10 ASCII characters...

"MY_STRING."

Word N7:0 = ASCII MY (Decimal 19801)
Word N7:1 = ASCII _S (Decimal 24403)
Word N7:2 = ASCII TR (Decimal 21586)
Word N7:3 = ASCII IN (Decimal 18766)
Word N7:4 = ASCII G. (Decimal 18222)

Then, in the String Display's Connection tab, use {::[shortcut]A7:0,L5} to pull in the 10 ASCII characters from N7:0 - N7:4. This is a direct reference to the controller, and should work.

p.s.
Quote:
Originally Posted by jasonm
...I changed the syntax to ::[short cut]N10:0
In the string display on the PV+ I get 12366. I still need it to be in ASCII format and for a length of 10.
12366 is the Decimal equivalent of the ASCII characters O & N "ON", which were both stored in N10:0. Using N in the shortcut displayed the Decimal value. This further proves the point that the original 10 characters were indeed stored 2 characters per word.

Regards,
George
Attached Images
File Type: png MY_STRING.png (22.2 KB, 80 views)
__________________
"A little nonsense now and then is relished by the wisest men".

Last edited by Geospark; October 15th, 2014 at 04:26 PM.
  Reply With Quote
Reply
Jump to Live PLC Question and Answer Forum

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 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
Factory Talk View Studio + PLC 5 + Panelview + = possible ??? darkesha LIVE PLC Questions And Answers 10 April 29th, 2014 04:24 PM
Factory Talk to PLC5 Tag Syntax Uzzy LIVE PLC Questions And Answers 0 April 20th, 2012 07:52 AM
Factory talk machine edition, AB PLC5 RIO tag mykeeplace LIVE PLC Questions And Answers 1 July 19th, 2011 07:46 PM
does factory talk view can read controllogx's to PLC5 map files wilsonzhu LIVE PLC Questions And Answers 0 April 10th, 2008 04:30 PM


All times are GMT -5. The time now is 04:36 AM.


.