Jump to content
LoganS

Getting data from txt file on server to vision PLC

Recommended Posts

Im presented a situation where a customer has a machine that pulls its parameters from texts files on the company server when the bar code reader scans the part number on a job ticket.  The bar code is just pointing to the text file of the associated part number.  This txt file contains all of the parameters for the part.  The existing system is a laser marker and it is already set up to pull all the information it needs from the text file.  I have been tasked with integrating a robot to automate the loading and unloading of the machine, which I am comfortable with.    For the machine to function how they want it to the robot and peripheral fixturing will have to self adjust to accommodate the different parts, and again, I am comfortable with handling all of this once the data is in the PLC .  What I am not familiar/comfortable with is the "IT data"-to-PLC side of things.   What is needed on my end to pull in this information from a text file?  I have at my disposal a competent IT person at the customer site that says he can do any scripting that I need to get the data isolated if need be but where I am lost is what do I need to have on my end and what do I need to ask him to do?  Can my vision controller handle scanning this hole txt file and then parsing the data I need? How do i request to pull in this info from the text file? Is there a max string length that I can pull in etc etc?    

  • Manual data entry is not an option
  • There are over 10k part numbers so having all of that already in the plc is probably not an option
  • Communications will be ethernet.  
  • At barcode scan, paramters will need to be loaded, machine adjusts, then cycle start

Any help appreciated thanks

 

Share this post


Link to post
Share on other sites

I wouldn't dismiss the possibility out of hand for putting the data into a Data Table. You can store up to 192K and depending on how many parameters you're talking about for each part # plus a bit ingenuity, you might be able to make it fit. You can also store a huge amount of data on an SD card (though you don't mention what model PLC you're using), which can be brought into a Data Table in manageable chunks, though this would be a bit slower.

If you must keep the data on their server, then just use MODBUS TCP to write the data needed from the bar code then the IT guy will have to perform the lookup then place the data you need into a location for the PLC to read, also using MODBUS TCP. I'm sure there are other possibilities.

Share this post


Link to post
Share on other sites
5 hours ago, Flex727 said:

I wouldn't dismiss the possibility out of hand for putting the data into a Data Table. You can store up to 192K and depending on how many parameters you're talking about for each part # plus a bit ingenuity, you might be able to make it fit. You can also store a huge amount of data on an SD card (though you don't mention what model PLC you're using), which can be brought into a Data Table in manageable chunks, though this would be a bit slower.

If you must keep the data on their server, then just use MODBUS TCP to write the data needed from the bar code then the IT guy will have to perform the lookup then place the data you need into a location for the PLC to read, also using MODBUS TCP. I'm sure there are other possibilities.

i guess im just confused how i get modbus messages out of a server? is this easier than im thinking it is.  I assumed i would have to pull in raw tcp or udp somehow or else have an intermediate device translate to modbus

Share this post


Link to post
Share on other sites
7 minutes ago, LoganS said:

i guess im just confused how i get modbus messages out of a server?

You said you have a competent IT person at your disposal. Isn't that a question for him (or her)?

Share this post


Link to post
Share on other sites

Have him Google "modbus driver (insert favorite programming language here)"

Modbus is as close to a universal industrial protocol as there is.  Being a free and open protocol really helps.

Joe T.

Share this post


Link to post
Share on other sites

But Joe, you forget that Modbus is "old" and not trendy.    

Only oldies (those humans greater than 25 years according to youngies) know about it and how much it is really used.  🙄

cheers, Aus

Share this post


Link to post
Share on other sites
9 hours ago, Ausman said:

But Joe, you forget that Modbus is "old" and not trendy.    

Only oldies (those humans greater than 25 years according to youngies) know about it and how much it is really used.  🙄

cheers, Aus

Haha well fortunately I fall just over that 25 year age restriction and use and love modbus.  I will ask the IT guy about coding something to feed me modbus frames.  I guess i was just hesitant to ask him to do more because of my short comings/lack of knowledge on the TCP side of things.

I guess ill ask then just to try and undertand and learn then- what are some of the tools in visilogic that could be used to handle data on the TCP/IP layer rather than converting down to an application layer protocol like modbus?  I see there are some TCP RAW and UDP RAW function blocks but the examples and info in the manuals is very simplistic and vague. There is also an SNMP protocol that is way out of my wheel house.  Anyone have any insight or resources on these?

 

Thanks

Share this post


Link to post
Share on other sites

Tell us what is a TXT file source?

Where the data is coming from?

This will help to understand if simplest way is possible to transfer this file to PLC.

B.R.

 

Share this post


Link to post
Share on other sites
15 minutes ago, AlexUT said:

Tell us what is a TXT file source?

txt file source would be the company's part database

15 minutes ago, AlexUT said:

Where the data is coming from?

it would be coming from the company server that will be on the same network as the PLC

15 minutes ago, AlexUT said:

This will help to understand if simplest way is possible to transfer this file to PLC.

B.R.

 

I would imagine the basic sequence of events will be something like:

User scans bar code which searches database for the text file for the part number that was scanned.  The IT system will have some scripting/code to then send this txt file (or portions of it) to the controllers IP address.  The information from this sting of text will populate some different MI in the ladder to set parameters for the machine.

 

Hope this helps, thanks

Share this post


Link to post
Share on other sites

Would you like to use UniStream, which supporting SQL interface?

UniStream supporting FTP file transfer as well.

If UniStream is not an option - visit at next link:

https://unitronicsplc.com/software-visilogic-for-programmable-controllers/

and scroll down for "Programming tools for developers.

Probably you can find one you can use.

You can develop PC program which transfer required data between company server and PLC.

B.R.

 

  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, AlexUT said:

Would you like to use UniStream, which supporting SQL interface?

UniStream supporting FTP file transfer as well.

If UniStream is not an option - visit at next link:

https://unitronicsplc.com/software-visilogic-for-programmable-controllers/

and scroll down for "Programming tools for developers.

Probably you can find one you can use.

You can develop PC program which transfer required data between company server and PLC.

B.R.

 

I was wondering if those would be required to do this.  I will let my IT support know that these tools are at their disposal as well. Thanks

Only reason Im trying to stay with visilogic is because I know it already.  Im sure someday I will have to make the leap but so far havent needed to.

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...