Internet PLC Forum
General => Technical support => Topic started by: Fernandz on September 04, 2003, 04:16:28 PM
-
Is there a list of commands that can be used to return the values of the Analog inputs of the M-series PLC? I would like to use the MScomm control to link to the serial port.
-
The M-series PLC does not automatically queries the ADC ports unless you program it specifically to do so. So in order read an ADC value from AD input #n, you need to execute the ADC(n) function periodically to retrieve the readings. That can be easily achieved using a clock pulse and execute the ADC(n) function periodicaly.
Once the ADC(n) function is executed, you can then use the "RVS0Bnn" command to read the ADC data from its internal registers. Alternatively, if you have read the values into DM- variable by executing e.g.
DM[10] = ADC(1)
then you can use the host link command "RVDxxxx" to read the value from the DM.
We have a sample VB6 program that you can download from our website to assist you in writing your comm routine with work with the PLC, as follow:
http://www.tri-plc.com/applications/VBsample.htm
-
Thanks.......I skipped over chapter 4 in the User Manual my fault. ;D Now i understand the command/response format