Communications with Computer

skarrde

Member
Join Date
Apr 2006
Location
MN
Posts
5
Currently we have a testing machine that takes a signal from load cells and runs it into a card on a pc which is then used to calculate force in a dos program. We are looking to upgrade the programming seeing as there are no new mobo's for dos based programming. We are thinking of using a plc for this and other functions of the testing machine but I am not sure how to go about taking the analog input and communicating it to the pc. Would one use a mov command?

Freely admit I am new to this and have gone thru the entire site with the online training and went to thelearningpit.com and picked up their software to learn how to program some.

Also I am not sure which type of plc to go with. Currently we have an micrologix 1100 sitting in our blow molder with a copy of rslogix 500 in house.
 
You can take the anolog signal and scale it in the processor. For example if your load cell outputs a 4-20 ma, you would scale 3277 to 16383 and scale that to 0 - 500 (lbs?) with the result placed in N9:0.

Getting it from the 1100 to the pc will be more difficult. You could do it with RSLinx Pro (not lite) and for instance send the results to an excel file.

Another way to go if you are using a VB program would be to use a third party software and either take it thru the ethernet port or over the serial port.

Give use a little more info on what you want the PC to do and we should be sble to help you futher.
 
Skarrde,
You have a lot of options to consider.
I would get a MicroLogix PLC that has at least 1 analog input and whatever else you need as far as discrete I/O points.
Then to get the data into the new PC you can use the PLC serial port to PC serial port if distance is not too great. If distance is an issue, consider a serial to ethernet adapter. That is the hardware side. The software side requires RSlinx (singlenode) version. The RSLinx (singlenode)software can get the data from one SLC and make it available to any DDE or OPC capable application such as Excel or SQL. There are many more options of course. Some will be cheaper. Measurement Computing makes an analog card that will fit into a PC's PCI slot. For< $600 minus accessories.
http://www.measurementcomputing.com/cbicatalog/cbiproduct_new.asp?dept_id=139&pf_id=1486&mscssid=BV0XBLPWKQ288HR8PK7U7KKVP23PAK7E

Many other companies make similar PC cards. This is the only company I have delt with before. Not this card in particular though. I guess it depends what type of program on the PC will need the data, VB, VB.Net, Cobal, Office etc...


Good luck BD
p.s. Welcome to the forum!
 
the pc is the user interface for the program and does the computations. There are 4 Load cells that measure the pressure being put on a bed. we then take the info from the 4 and average them together with a formula to figure out total force. That information is then printed on teh screen along with a graph of how much force is being put on over a set amount of time. This is then printed thru a printer to be held for documentation. The pc and plc would both be connected at all times either via a serial cable or ethernet(whichever is easier).
 
Thanks for the help thus far guys greatly appreciate it. Forgot to mention above that the programming is mostly in vb.

Now to transfer it along the cable one would use the msg command correct? Does this command send it to a set location?

I freely admit I am a total noob coming into this and going thru my lessons I can understand the language for keeping it in the plc tho I still haven't completely wrapped my head around the masking and such. The biggest problem I am having is how is that information transfered to the HMI/ PC.
 
skarrde,

SLC messages usually go from one SLC to another SLC / PLC. I don't think you can use a message instruction to put data into a VB app. You can buy a ActiveX file that can be called from within VB, but I have never used that approach before either. I just use RSLinx program along with Excel & DDE link. Does VB have DDE capability? In Excel I just make a link to "RsLinx" DDE topic, then add the SLC data table number and word. Click on update links and bingo there is the new data in the cell. By the way DDE stands for dynamic data exchange.

BD
 
Eliminate the PC

skarrde said:
the pc is the user interface for the program and does the computations. ...This is then printed thru a printer to be held for documentation.
Then you don't need a PC.
An HMI has graphing built-in. Get one with a printer port for the hard copy. I know the Maple Silver Series can do this. There are many others.
Make sure the PLC can do floating point math. It shouldn't be too much trouble to convert the math from VB in PLC code.
You said all you're doing is averaging the 4 transducers. You probably don't need floating point to do something that simple.
 
Last edited:
If you have the micro 1100 I am thinking of (Don't think there is another lol ) then you have all you need......maybe. What you need to find out is what the transducers actually put out for a signal. If these instruments put out a 4-20mA signal, then you are way ahead. All you need is an expansion I/O card to add the extra analog inputs to 4. These ananlog inputs come in to the PLC as a milliamp signal, which at this point you could care less about, what matters is what each transducer puts out at maximum rating. If the transducer puts out 20mA at 1000 kg then you scale your value of 32767 to 1000. Again you can forget the milliamp signal if you are just trying to get the idea of the situation. After scaling the signal 0-1000 for each transducer you can do whatever math you desire. Forget, I repeat FORGET the MSG instruction, for what you thinking, FORGET the MOV instruction, you are reading way into the problem.

Now, you need RSlinx and a cheap version of RSView to display the values in an HMI or SCADA scenario. (of course there are more just trying to keep it simple) Yes, you can use DDE, SQL, but by the level of the question, I would pay the money to buy a base package of VIEW, and make a nifty little screen where you could show any math the person wanted, add, average, double whatever the heck you want. Unless you understand databases stick to something simple. If you have other question email me!
 
Getting the info into the PC from the PLC

Aloha;

I'm used to using the GE 90-30 PLCs and have used the comreq command in the ladder logic to make the PLC push data through the data port. If you use a Maple display you don't need to do any comreq functions in your ladder logic. The maple can grab datapoints or analog and register values and turn them into displayed values on their touch screen. If your PLC has an RTU (Modbus) port you can load a modbus server on your PC and grab the data from your PLC through the PLC's MODBUS port. I've used this MODBUS server from Ricardo Saat (Brazil) and it works very well and is stable, oh yeah and it's free too. The download site is: http://members.tripod.com/~mbserver/ You can write your code for the PC in VB, VisualC, Delphi, whatever... Basically you make very simple calls to the modbus server which does the work of retreiving the data and posts it back to your application.

I hope that helps.
 
this has been a great help folks, I greatly appreciare it. One last question, is there any resources you can recommend to me? I have most of the basics down and I would like to expand my knowledge.
 
Since you have a Micrologix 1100 there you may be more comfortable with it. It could provide the I/O for control of the testing. It has analog input modules available (though I would use an intermediate conditioning module between the load cells and the analog module to provide excitation and initial amplification.)

If you use a Windows compatible interface such as the ActiveX controls available here you could bring the information easily into a VB or Excel application. That would probably be the least painful route.
 
The way I see it, is that the PC will be doing all the work so it seems pointless to involve a PLC as this complicates the PC interface software. Most load cells provide millivolt outputs (Though 4-20mA devices exist) The output is typically only a few millivolts/volt excitation at most and requires proper signal conditioning. (With 10 Volts excitation a 1mV/Volt load cell will output 10mV at the rated load etc)



Why don’t you use off the shelf data acquisition modules?



I’ve used acquisition modules for this type of application in the past with success. Types I’ve used are ‘ADAM’ and ‘NuDam’.



You can communicate via the PC serial or USB port (depending on module type) using VB6s MSComm Control. Manufacturers also supply drivers that support VB.



Modules I’ve used in the past also provide load cell excitation voltage and the inputs are designed specifically for low-level load cell signals. Output modules are also available.



My only reservation is speed. If your application needs very fast data acquisition I’d go for a PC card instead.
 
I know this method may not be the cheapest, or most popular, but I did a simular setup recording loadcells with Labview and a NAtional Inst's SCXI module. This is an older setup, I used 6i about 5 years ago but it worked. The only tricky part was setting the calibration about once a month. It was set up for force and temp through different modules that connected to the SCXI unit. I made a user interface with it and the higher ups were happy.
 

Similar Topics

Hello, I'm trying to delve a little into rs-485 communications for a couple projects of mine. Until now I've been using a delta vfd and a delta...
Replies
2
Views
105
Sorry if this has been asked before, and apologies if this seems like a trivial issue, but I am new to Beckhoff and have been banging my head...
Replies
2
Views
138
I have a curious question and I can't seem to find any information on it. I'm hoping I'm just overlooking something simple. I have 4 machines...
Replies
3
Views
450
Multiple PLCs in our plant communicate using either MSG instructions or Produce/Consume. Is there an industry best practice for documenting this...
Replies
3
Views
756
Hi Guys I am looking for some help to get communications going through a Stratix 5700 with a NAT rule in it. I did not set the stratix up but I...
Replies
2
Views
996
Back
Top Bottom