Omron CJ1M - how to copy changing value to register

falpaw

Member
Join Date
Jul 2008
Location
Warsaw
Posts
6
Hello ,

I want copy a changing value from analog input to registers . I want to do this for example every 1 ms , and store this samples somewhere in PLC's memory . Does omron has this kind of instruction . I have tried a push into stack (PUSH) instruction but I don't think is it right way .
Do You have any ideas ? i will be glad for any response
 
Hello Paulus ,

I am fresh guy so be tolerant . According a instruction I have to write two control words : TB and S .
S - will be my changing value from analog input - right ?
And what I have to write to TB ?

I wrote there :

PUSH(632) D0 D200

What should I write to D0 D1 D2 and D3 ? Cause i think that I have to something .
 
1 ms might be to much

Have not done Omron in a while. Don't forget to compare previous value with what you PUSH. Omron will also overflow (used to) to negative when you pass top positive maximum.
There is also a move with index. If I didn't have a lot of work I would spend 30 minutes at the other end of the plant to open the Omron software. Let me know by private message in 2 days if you are still stuck on this one.
1 ms is not that mutch time for most analog cards and PLC scans to react. Try to do it every other scan see (bit off turns on and on turns off) what values you get. My guess is that you will get decent data 3-5 ms apart (some slow cards might take 10-20ms).
 
Last edited:
Hello ,

YEs , 1 ms could be too much , I know , but I wrote that just as a example . All the time I have problem with this instruction , so I think I will need some help from your side .
 
In order to use the Push onto Stack, PUSH(632), instruction you need first set up the stack using the Set Stack instruction, SSET(630).

The SSET instruction takes two parameters, the starting address and the size of the stack in words. The size includes the 4 words that are the last word location and data pointer, D0-3 in your case. Therfore you need the set the number of words to 4 larger than your desired stack size.

You would set the stack (16 words here):
SSET(630) D0 20

Then you could push D200 onto the stack:
PUSH(632) D0 D200
You may want to look at the CS,CJ Instruction Refence Manual for more information.
 
Ok ,

Now all works , much help for your help and support . I had to add @ before push , and during first scan set up stack .

Thank You
 
Hello!,
The AD card CJ1W-AD041-V1 has the following rule concerning the conversion time: Sampling_interval=(1ms) x (number of used inputs). In case of using 1 input the interval time is equal to 1ms. This note I have found in OMRON data sheet of Analog cards. Is it true ?
Best regards
Peter
 
Last edited:
Repeat Problem

Hello!,
The AD card CJ1W-AD041-V1 has the following rule concerning the conversion time: Sampling_interval=(1ms) x (number of used inputs). In case of using 1 input the interval time is equal to 1ms. This note I have found in OMRON data sheet of Analog cards. Is it true ?
Best regards
Peter
 
Peter.
If you're not getting the answer you need quickly, you should ask for your money back.
Anyway, it's 1ms or 250us for all, selectable by parameters (m+18)
Pp
 

Similar Topics

Hi dear . I have a system with cj1m cpu11 etn. previously NT 5z HMI was connected with plc. recently my old HMI got damaged. I want to replace it...
Replies
12
Views
234
hi dear all hope you all are fine I have a problem with my CJ1M cpu11 ETN. it stop communication with PC over ethernet. ETN unit all indications...
Replies
4
Views
163
Hello everyone. I am new when it comes to Omron PLCs. Currently I'm uploading program from CJ1M PLC using CS1W-CIF31 cable only. I connected the...
Replies
2
Views
156
i have been trying to connect to omron cj1m via peripheral port(USB to Serial), but there isn't any sign to show that it has connected, so am...
Replies
0
Views
318
Has anyone encountered an error code 31 on an omron cj1m-cpu12? This error code is not covered in PLC manual.
Replies
1
Views
521
Back
Top Bottom