SHAFURDEEN Posted February 5, 2018 Report Posted February 5, 2018 Hi members of the forum , I have a problem that need to be solve . Need some support in data transfer from Barcode – PLC – SQL. Below is the situation. Currently now in each material we use in machine there will have 3 information of barcode to be capture. How can the PLC detect all 3 information and send it to SQL as one data. E.g: material cage over mould Info that ned to be capture: Product ID No: BM01MFG0001-01-B Work order No: WO151885 Qty: 300 All three information can be send as BM01MFG0001-01-B,WO151885,300 and how can I send it all to get there to our SQL? Currently now I'm using NJ series and NJ-DB. Question : What need to be change to make all above data to be send to SQL column Cage_Batch_No Below is the current RUNG that we have. What need to be edit at below RUNG to make it able to collect all 3 data and send as 1 data to the MOVE location.
Michael Walsh Posted February 5, 2018 Report Posted February 5, 2018 I cannot see the pictures for some reason. But, basically you need to parse the string into the three pieces of data and then convert each of the three to the appropriate data type (that matches the database). Perhaps: Product ID as STRING Work order as STRING Qty as UINT Then use the DB commands to send the data. 1
Michael Walsh Posted February 5, 2018 Report Posted February 5, 2018 By the way, I deleted your other duplicate post.
SHAFURDEEN Posted February 6, 2018 Author Report Posted February 6, 2018 (edited) Hi Michael Here I attach the ladder for your view. Perviously we only scan 1 info and now we wanted to scan info in a row and capture it as the data. Info that ned to be capture: Product ID No: BM01MFG0001-01-B Work order No: WO151885 Qty: 300 All data capture hope to capture as shown: BM01MFG0001-01-B,WO151885,300 The new data we need to transfer to Rung 5 as where EQascii number 4 is where the data need to be install and transfer to NJ-DB. Can I write the code as above , current I just wrote 2 data info and move it to DB. And help to show me some sample code ifyou have one. Edited February 6, 2018 by SHAFURDEEN 1
SHAFURDEEN Posted February 14, 2018 Author Report Posted February 14, 2018 Hi Micheal Can you help to show me some sample rung for me to this project? Really appreciate it.
Michael Walsh Posted February 15, 2018 Report Posted February 15, 2018 I am sorry, but I do not understand what you are asking....
SHAFURDEEN Posted February 15, 2018 Author Report Posted February 15, 2018 Hi Micheal As per previous reply you suggest me as below: Product ID as STRING Work order as STRING Qty as UINT Can you show me a sample of rung on how to make product ID and Work order as a String , while Qty as a UINT. and how I can send above data as Product ID,Work,Qty to the next Function block.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now