how to move data into an array and then display on a hmi

stu

Member
Join Date
Aug 2005
Location
England
Posts
772
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

db vs result.PNG bytes.PNG
 
Last edited:
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

0D082DB2-3391-43F1-BB91-EC0384FE9803.jpeg 67FC6FE2-E5BE-4D6A-9954-EF397694A843.png
 
Last edited:
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
 
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

bert.jpg
 
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

lower vs.PNG watch table.PNG scl byte.PNG
 
Oh ok and I type that in the scl
adData[1]:=%IB18
Then type in the information you shown in network 1
 
Thanks for your help I will try tomorrow,
I’m sure I will find another question ��
Much appreciated
 
HI
I typed out the code this morning ,and where you typed bert i have the red underlined ? what does that mean
thanks stu

SCL QRCODE.PNG
 
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.
 
thanks for that
i still have a red cross on the network , is that to do with the FOR and END FOR ??

SCL QRCODE 1.PNG
 
You must remove the test data section as you are populating the array with data from your input bytes from your QR scanner.
 

Similar Topics

Hello Guys, I have sensor on the conveyor and everytime when part hit that sensor, i want to know the date and time and how long part stayed there...
Replies
3
Views
1,607
Hi Guys I have completed a couple of applications with the Micro820 from AB so I thought I would use one for an automated test system. I have a...
Replies
12
Views
7,086
i try to move with one msg function array that i created in rslogix 5000 data type that have 1 int and one real but i have an error messege why?
Replies
1
Views
2,066
Afternoon, I have a DB in TIA Portal V16 that is optimised. I cannot change this. There is an array inside that block which consists of 3000...
Replies
9
Views
1,037
Hi, can anybody tell that how can we move floating point data from one Regiter to another register in Fatek PLC.?
Replies
0
Views
1,519
Back
Top Bottom