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 February 22nd, 2021, 03:09 PM   #1
cagliostro
Member
Italy

cagliostro is offline
 
Join Date: Feb 2007
Location: VICENZA
Posts: 101
TiaPortal from %IWxxxx to String

Hi All,

through a PN / PN coupler, receive a series of data from another Siemens PLC.

An area of 32bytes (From% IW840 To% IW870) has been reserved in the exchange data which contains the name of the recipe to be displayed on a TP1200 Comfort HMI.

My problem is that I don't know how to take the 32 bytes and convert them as a string to be displayed in the HMI
The CPU I am using is a FailSafe 1510.
Thanks in advance for your support
  Reply With Quote
Old February 22nd, 2021, 03:21 PM   #2
drbitboy
Lifetime Supporting Member
United States

drbitboy is offline
 
drbitboy's Avatar
 
Join Date: Dec 2019
Location: Rochester, NY
Posts: 2,317
https://www.google.com/search?q=siem...data+to+string
  Reply With Quote
Old February 22nd, 2021, 03:28 PM   #3
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,192
Are the bytes actually characters? What will indicate the end of the string?
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old February 22nd, 2021, 03:58 PM   #4
cagliostro
Member
Italy

cagliostro is offline
 
Join Date: Feb 2007
Location: VICENZA
Posts: 101
Maybe using the instruction Char To String I should solve.........
  Reply With Quote
Old February 22nd, 2021, 06:40 PM   #5
L D[AR2,P#0.0]
Lifetime Supporting Member
United Kingdom

L D[AR2,P#0.0] is offline
 
Join Date: Nov 2006
Location: UK
Posts: 6,192
Yes, example code:
Attached Images
File Type: jpg strg1.jpg (100.4 KB, 50 views)
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old February 23rd, 2021, 02:49 AM   #6
cagliostro
Member
Italy

cagliostro is offline
 
Join Date: Feb 2007
Location: VICENZA
Posts: 101
Great...........
Thanks to All
  Reply With Quote
Old February 23rd, 2021, 06:01 AM   #7
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 14,613
You never answered this:
Quote:
Originally Posted by L D[AR2,P#0.0
]Are the bytes actually characters?
If the data being received are already formatted as a string, then you dont have to convert anything.

It would be illogical to transfer as array of bytes. The partner PLC is a Siemens S7, which supports strings natively.
__________________
Jesper
See my profile interests for Q&A
  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
Convert System Date Time to DINT or REAL, RSLOGIX busarider29 LIVE PLC Questions And Answers 12 October 25th, 2020 08:18 AM
RSLogix 5000 string datatype LEN field radfahrer LIVE PLC Questions And Answers 5 September 21st, 2016 11:07 AM
XML read problem in VB.Net userxyz LIVE PLC Questions And Answers 8 October 15th, 2015 01:08 PM
String misbehave ! manmeetvirdi LIVE PLC Questions And Answers 7 December 7th, 2009 11:54 PM
Delete recipe in rsview file using command button?? briana banks LIVE PLC Questions And Answers 4 January 25th, 2007 02:53 PM


All times are GMT -5. The time now is 05:14 PM.


.