Read CJ1M Data Memory and display in VB

ajiebon_88

Member
Join Date
Oct 2011
Location
perak
Posts
2
How to read all or few Data Memory from PLC and display in VB


I am new in PLC to VB programming and i have a basic in ladder diagram and VB. I have build a ladder diagram that set a value #1 to DM0 if any input(for example : 0.01) in on and value #0 if the input is off. I have a few input(for example : 0.01, 0.02, 0.03) that also did the same process that is MOV the #1 value to DM0(for input 0.01) , DM1(for input 0.02) and DM3(for input 0.03) when the inputs is on and MOV #0 value when the inputs is OFF. Now, i am asking how to read the DM0, DM1 and DM3 in PLC to display in VB. As i know, we can read only 1 DM in 1 command. The example comman in VB to read DM from PLC that i create is

RD = "@00RD0" & "000" & "0001" 'RD Command format
Q = 0
For I = 1 To Len(RD)
Q = Asc(Mid$(RD, I, 1)) Xor Q
Next I
AxMSComm1.Output = RR & Hex$(Q) & "*" & Chr(13)

What is the command to read all three DM above and display in 1 textbox, or 3 textbox seperate. Sorry my english language is bad. Hope anyone can help me coz i have find the solution long time ago. thanks:wish:
 
RD = "@00RD0" & "000" & "0001" 'RD Command format

Change the last value in "" to "0003" will read 3x consecutive words.

Creating the text box's should be quite simple, getting the data into them is a bit more work.
Your example looks differentto what I would do.
I am mobile at moment, so don't have access to any examples.

If you go to MrPlc.com, there is an ActiveX in the Omron downloads section that has examples & will do everything that you want.
 

Similar Topics

Hi plc.net I have Citect 7.2 connected to an Omron CJ1M etn 21 over Ethernet using OMFINS. Reading tags is not a problem, but writing to them is...
Replies
7
Views
7,551
Hi, The hardware is: Click Plc model # CO-O1DD1-O HMI model # S3ML-R magnetic-inductive flow meter model # FMM100-1001. I will set the flow meter...
Replies
4
Views
115
Is there a way to use the FAL instruction to do +=2 instead of +=1? I have an array that is organized with alternating "data" and "flag" values...
Replies
5
Views
123
Hi everyone i have a customer, who wants to show an alarm on the machine, if the I/O forces are enabled and set, on at ControlLogix L81E with...
Replies
3
Views
225
Hi Iam using monitouch hmi(V9 soft) with omron plc cj2m (CX programmer). In this I want to read a data from hmi to plc. The data was like...
Replies
0
Views
93
Back
Top Bottom