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 November 30th, 2021, 10:11 AM   #1
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
how to move data into an array and then display on a hmi

hi i have a baumer vision unit picking up a QR code this is connected to a siemens 1200 plc.

i have a IB18 In the device that is the start of is result data , the code i have just scanned tell me its 8 bytes long

i have created a udt file with an array (32bytes) and added to a db
how do i get to transfer the vision data from IB18- IB26 (IF THATS THE 8 BYTES) In to the array and on to a display , the biggest qr code i think they need is 9 characters with letters and numbers.
my issue is understanding how to move the data .
so a recap if im right , the start of the result data is on IB18 the qr code tells me its 8 bytes on the software so im thinking byte IB26 will be the end ?
ive attached a picture of the array and a picture of the watch table with the IB18 Showing

then moving that data into the arrays and back to a string or what ever the end value is ,is where im stuck and need your help
can one of you kind people point me in the right area please
thank you in advance stu
Attached Images
File Type: png db vs result.PNG (155.0 KB, 24 views)
File Type: png bytes.PNG (10.9 KB, 18 views)

Last edited by stu; November 30th, 2021 at 10:33 AM.
  Reply With Quote
Old November 30th, 2021, 02:33 PM   #2
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,336
Where are you reading the 8 bytes length from?
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old November 30th, 2021, 02:53 PM   #3
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
When I set the device overview up on profinet on the verisens vision,
I set up the result data I address from 15 -46 bytes I’ve attached the manual guide of what the bytes are
So Im taking it that my start byte would IB18 or IB19 ?

When I was using the software of the verisens vision I could see the scanned qr code and it stated there it was 8 bytes
Attached Images
File Type: jpeg 0D082DB2-3391-43F1-BB91-EC0384FE9803.jpeg (52.3 KB, 15 views)
File Type: png 67FC6FE2-E5BE-4D6A-9954-EF397694A843.png (9.1 KB, 10 views)

Last edited by stu; November 30th, 2021 at 02:56 PM.
  Reply With Quote
Old December 1st, 2021, 07:07 PM   #4
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
Would it be better if I wanted the results data in to the plc is I
Insert a move_blk , scatter instructions ? In the rung as I have the IB18 in a table and the array in a db 10 example , P#IB18.0 byte 32 that is the start input from IB18.0 for 32 bytes - and then output P#DB10.

Is this right and all the IB18-50 will go to the dB array. And how Would I display that as a number in the plc like pac12345
  Reply With Quote
Old December 2nd, 2021, 07:50 AM   #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,336
Here's some processing that will take some bytes in an array and create a string so you can show the QR code on an HMI
Attached Images
File Type: jpg bert.jpg (165.8 KB, 71 views)
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old December 5th, 2021, 08:03 AM   #6
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
hi
im looking at the setting up of the vision data to a scl ?
the address from the vision system Starts from IB18.0 byte and i have watched table with the bytes in (this is maximum of 32 bytes )

I have tried to right the SCL like shown but i doesnt like the tag thats in my table for the whole byte the vs camera result data starts from 3 byte in
see first picture

the next picture is the watch table then the scl
how do i get the watch table tag to go into the scl that is assigned to the vs data ?IB18
In SCL it asks me to define tag but its in the watch table ?unless i have to put into a different tag ?

is there away to get the information from the ib18 into this format
thanks stu
Attached Images
File Type: png lower vs.PNG (15.9 KB, 5 views)
File Type: png watch table.PNG (10.0 KB, 3 views)
File Type: png scl byte.PNG (4.7 KB, 4 views)
  Reply With Quote
Old December 5th, 2021, 10:33 AM   #7
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,336
abData[1]:=%IB18;
abData[2]:=%IB19;
etc.
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old December 5th, 2021, 11:21 AM   #8
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
Oh ok and I type that in the scl
adData[1]:=%IB18
Then type in the information you shown in network 1
  Reply With Quote
Old December 5th, 2021, 01:33 PM   #9
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,336
Yes.
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  Reply With Quote
Old December 5th, 2021, 01:40 PM   #10
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
Thanks for your help I will try tomorrow,
I’m sure I will find another question ��
Much appreciated
  Reply With Quote
Old December 6th, 2021, 06:28 AM   #11
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
HI
I typed out the code this morning ,and where you typed bert i have the red underlined ? what does that mean
thanks stu
Attached Images
File Type: png SCL QRCODE.PNG (44.2 KB, 33 views)
  Reply With Quote
Old December 6th, 2021, 06:46 AM   #12
JesperMP
Lifetime Supporting Member + Moderator
Denmark

JesperMP is offline
 
JesperMP's Avatar
 
Join Date: Feb 2003
Location: Copenhagen.
Posts: 15,092
I think you are missing an ')' and/or a semi-colon ';' after the line that starts with #sQRCode ..

and you definitely miss an ';' at the end of the last line.
__________________
Jesper
See my profile interests for Q&A
  Reply With Quote
Old December 6th, 2021, 07:06 AM   #13
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
thanks for that
i still have a red cross on the network , is that to do with the FOR and END FOR ??
Attached Images
File Type: png SCL QRCODE 1.PNG (42.8 KB, 33 views)
  Reply With Quote
Old December 6th, 2021, 07:13 AM   #14
stu
Member
England

stu is offline
 
stu's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 708
Ive found the typo thanks
  Reply With Quote
Old December 6th, 2021, 09:59 AM   #15
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,336
You must remove the test data section as you are populating the array with data from your input bytes from your QR scanner.
__________________
S7-300 to 1500 conversions done - email to s7conversions@hotmail.com
  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


All times are GMT -4. The time now is 12:40 AM.


.