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.

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 May 22nd, 2022, 01:04 AM   #1
slick_william
Member
United States

slick_william is offline
 
Join Date: Apr 2020
Location: Oregon
Posts: 18
Rockwell Logix 5000 Produced/Consume UDT Path?

Hi there,

I am doing work for a customer who has a UDT that uses parameters like this:

PLC_REG_TO_SEND.GROUP_15.1234_DINT[1].0

I believe these tags are laid out with the intention that they will be Produced and that other controllers (like mine) will Consume the tags. I believe the PLC_REG_TO_SEND would be like a Consume path? And the Group_15 is a structure/UDT which has members like 1234_DINT, and 1234_REAL, and so on. I have done a bit of Produce/Consume but not much.

However, I am used to doing MSG instructions, where I might be able to poll each GROUP_15.1234_DINT[k] individually, or something like that.

The issue I am having is that when I try to create a UDT which has a member called 1234_DINT of type DINT[10] for example, Studio 5000 does not like that it starts with a number (1234_DINT). I get the error "Error in member name: Name is invalid".

Has anyone seen a UDT like this, and can anyone explain what the PLC_REG_TO_SEND part would be for? I have seen UDT's like Pump_1.isCalled (bool) and Pump_1.speed (real) or something like that, but never a UDT with two periods or sets of parameters (PLC_REG_TO_SEND.GROUP_15 vs. GROUP_15.1234_DINT[1].0).

Any info on this is massively appreciated. Thank you.
  Reply With Quote
Old May 22nd, 2022, 06:15 AM   #2
jstolaruk
Lifetime Supporting Member
United States

jstolaruk is offline
 
Join Date: Dec 2004
Location: Detroit, SE Michigan
Posts: 3,781
This link will help answer all of your produced consumed tag questions.
__________________
I don't always test my code but when I do, I do it in production.
  Reply With Quote
Old May 22nd, 2022, 02:06 PM   #3
slick_william
Member
United States

slick_william is offline
 
Join Date: Apr 2020
Location: Oregon
Posts: 18
Smile

Thanks for your reply, very helpful. I had seen that before and scanned through it, however on your recommendation I went through and set up a Produced tag which I will test when I am back in the office tomorrow.

I guess my one remaining question is this: How is it possible for the member of a UDT to start with a number, as our customer's UDT's do? For example,

PLC_REG_TO_SEND.GROUP_15.1234_DINT[1].0]

has the "1234_DINT" member which starts with a number. According to Studio 5000, this is a no-no, and I am wondering if the tag list we were provided is inaccurate.

I will reach out to the customer tomorrow to confirm, but would anybody know how it is possible for a member object or parameter to begin with a number?

Thanks
  Reply With Quote
Old May 22nd, 2022, 02:11 PM   #4
Ken Roach
Lifetime Supporting Member + Moderator
United States

Ken Roach is offline
 
Ken Roach's Avatar
 
Join Date: Apr 2002
Location: Seattle, WA
Posts: 16,585
It shouldn't be possible for a tag name, even for a sub-element in a UDT, to begin with a number. Maybe your client found a workaround using overlays or imports or hard-to-see characters, or maybe it's an error in their correspondence with you.

Any time you're doing P/C with complex datatypes, I strongly recommend doing and export/import from the source program to eliminate the risk of typos. The datatypes and element names must match *exactly*.
  Reply With Quote
Old May 22nd, 2022, 11:35 PM   #5
jstolaruk
Lifetime Supporting Member
United States

jstolaruk is offline
 
Join Date: Dec 2004
Location: Detroit, SE Michigan
Posts: 3,781
Quote:
Originally Posted by slick_william View Post
I guess my one remaining question is this: How is it possible for the member of a UDT to start with a number, as our customer's UDT's do? For example,

PLC_REG_TO_SEND.GROUP_15.1234_DINT[1].0]

has the "1234_DINT" member which starts with a number. According to Studio 5000, this is a no-no, and I am wondering if the tag list we were provided is inaccurate.

I will reach out to the customer tomorrow to confirm, but would anybody know how it is possible for a member object or parameter to begin with a number?

Thanks
This is as close as I've ever been to getting a UDT member to start with a number - by preceding it with an underscore:
Attached Images
File Type: jpg Capture.JPG (38.8 KB, 43 views)
__________________
I don't always test my code but when I do, I do it in production.
  Reply With Quote
Old May 23rd, 2022, 06:50 AM   #6
destination unknown
Member
Ireland

destination unknown is offline
 
Join Date: Jun 2010
Location: Ireland
Posts: 45
Quote:
Originally Posted by Ken Roach View Post
Maybe your client found a workaround using overlays or imports or hard-to-see characters, or maybe it's an error in their correspondence with you.
Overlays do not allow you to use a tagname with a leading number.

Quote:
Originally Posted by Ken Roach View Post
Any time you're doing P/C with complex datatypes, I strongly recommend doing and export/import from the source program to eliminate the risk of typos. The datatypes and element names must match *exactly*.
The tagnames do NOT have to match although it is standard practice that they do.

Also:
If you are using a UDT with the first member of type CONNECTION_STATUS then the datatypes have to match.

If you are using a UDT without CONNECTION_STATUS then the data types do NOT have to match but the overall UDT size must be the same.
In this case a DINT in the Producer could be read as two INT's in the Consumer...
  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
Studio 5000 v31.00.00 - Anomaly with View Designer v2/v3 Geospark LIVE PLC Questions And Answers 5 January 20th, 2021 11:09 AM
Logix 5000 install problem smiller LIVE PLC Questions And Answers 16 May 26th, 2015 10:47 PM
RS Logix 5000 UDT cjd1965 LIVE PLC Questions And Answers 3 March 18th, 2015 07:00 PM
Is RS Linx still on and loaded with the RS Logix 5000 CD ? Rob S. LIVE PLC Questions And Answers 5 October 21st, 2014 04:24 PM
rs logix 500 and rs logix 5000 vikas1947 LIVE PLC Questions And Answers 4 March 12th, 2012 07:42 AM


All times are GMT -4. The time now is 05:46 PM.


.