PLC5 and Factory talk view studio 7

jasonm

Member
Join Date
Sep 2013
Location
Washington state
Posts
6
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.
 
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.
 
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
 
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 ???????.
 
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
 
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.
 
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.
 
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
 
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
 
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
 
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?
 
PLC-5 N Integer File ASCII Data To String Display

toont said:
...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.

jasonm said:
...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.

jasonm said:
...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.
jasonm said:
...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

MY_STRING.png
 
Last edited:
Hello!


How it work with Studio5000 and FTV Studio 12? Do I use this syntax for?


For example:


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


Will it be {::[shortcut]Test[0],L5} ?


Thank you!
 

Similar Topics

I just upgraded a few of my servers to version 10 the upgrade worked fine but for some reason all my short cuts that I linked to PLC 5's will not...
Replies
2
Views
1,588
Hello, I've looked around here and Allen-Bradley and I can't find exactly what I need. I'm converting an old 1400e to PanelView Plus and I'm a...
Replies
0
Views
3,653
I am look to write RIO tags for a Panelview 1500, firm 5.0 to PLC5 5/60b processor. Hoping to find tag samples somewhere with no luck. I have...
Replies
1
Views
4,126
I am updating a project used panelview 1000, it connected a controllogx, but it not directly read/write controllogix's tag, controllogix map tags...
Replies
0
Views
4,601
Back
Top Bottom