Omron CJ2m Analog logic issue

The Omron analogue input will do that when the input value drops below 4ma. You need to program a work around. There are advanteges and disadnatages with these. Advantage is you can detect below 4ma - disadvantage you can see. Also the input will go to 32000 odd and indicate disconnection. If you require further information post and I will respond. I work with Omron all the time - my preferred PLC and software by a long way. Sorry about being a bit short - busy as and a whole lot more coming up. Have not been here for a while - Xmas break consisted of 2 days - Xmas and Boxing day. Been going hard on all other days. Been dealing with AWS today (Amazon Web Services) - the worlds greates PITA! Never mind - as long as they pay the bill I will put up with their world of idiots!!!
 
BobB,

Using the logic i posted, what do you suggest for the work around.
i am trying to use the < S(312) command, but i am having trouble getting it to work. Still a novice with Omron after all these years.

In regards to the < S(312) command, would someone please post the command?
james
 
i am trying to use the < S(312) command, but i am having trouble getting it to work.

Were you able to make the program edit? Can you show a screen shot of what you have now?

In regards to the < S(312) command, would someone please post the command?

Not sure what you are asking. In edit mode, double click the instruction and type in "<S", then press enter.

HotWaterLevelEdit.JPG
 
Sorry but have been busy. When the number in the channel goes to 65000 odd that means the input has dropped below 4ma - this can be usefull. If the number locks in at 32767 that means a disconnection - also usefull. That is using the UINT word type. Some code can be written to transfer 0 to a data memory if the number goes above say 60000 and input below 4ma can be used as an alarm or warning.
 
thanks everyone,

they filled the tank manually at night while i was at home.
needless to say, they overfilled the tank, water went everywhere.

i will try in a few weeks when they have to empty it for cleaning.
james
 
they overfilled the tank, water went everywhere.

Some time ago I was a young engineer working in a control room in a pigment plant. I was a contractor of a contractor, etc... (you know the game). The plant super or whoever, came running in the control room drenched in yellow pigment yelling, "Did you guys do anything to #x valve!?!". It was a 50,000 gallon tank that had spilled over the dike. My boss (superior contractor) immediately said no, we're working on the other system (which we were). After the super left, my boss asked me if I screwed with that valve, which I didn't.

Anyway, on jobs like that you learn real quick who you are faithful to. That just sparked a memory and wanted to share.
 
i will try in a few weeks when they have to empty it for cleaning.
It's the wrong solution but if you are still having troubles with signed vs. unsigned (which I don't think you are, but just in case), have you considered keeping unsigned and simply adding a level > 32767 instruction ORed (on a branch in parallel) with the level < &2100 and level < &2880 instructions?

The rationale is that, if the unsigned level value in the <S(310) comparison instruction is greater than 32767, then the input channel is actually returning a negative signed value for the level, which must be less than the positive comparison values (&2100 and &2880).

The details are in bit 15, the high bit of the 16-bit integer, whether signed or unsigned:
  • For an unsigned integer, bit 15 has an additive value
    • of 0 if the bit is 0, and
    • of +32768 if the bit is 1
    • so the range of integer values is +32768:+65535 if bit 15 is 1
  • For an unsigned integer, bit 15 has an additive value
    • of 0 if the bit is 0, and
    • of -32768 if the bit is 1
    • so the range of integer values is -32768:-1 if bit 15 is 1
I.e. the same bit pattern 0x8000 has a value of -32768 or +32768, and the same bit pattern 0xFFFF has a value of -1 or 65535, for signed or unsigned, respectively.
 
It's the wrong solution but if you are still having troubles with signed vs. unsigned (which I don't think you are, but just in case), have you considered keeping unsigned and simply adding a level > 32767 instruction ORed (on a branch in parallel) with the level < &2100 and level < &2880 instructions?

The rationale is that, if the unsigned level value in the <S(310) comparison instruction is greater than 32767, then the input channel is actually returning a negative signed value for the level, which must be less than the positive comparison values (&2100 and &2880).

Or just monitor if bit 15 is on?
 
I have attached a file called sample - it is a zipped cxp file. The code detects over 65000 - less than 4ma. It also detects 32767 - diconnected. It also detects >8100 - overange - usually sensor fail (8000 is the resolution of the analogue input). If any of these are present 0 is written into the work word. If none are present the input value is written to the work word. It is not perfect but will give you an idea of code for all this stuff. Hope this helps. In outback Queensland at the moment at a town called Cunnamulla - in the middle of nowhere. Cattle country - great steaks at the pubs. Hard to get veggies - 1 night a week - plenty of salad. A lovely small outback town. Commissioning a hot springs complex - bore water. Full of suphur. Get out of the shower in the morning and ask oneslef what stinks? Oh - it is me LOL.
 
BobB and IO_Rack,

i got the opportunity to work with the system today in regards to the <S command. Still learning the omron software and it took a while offline, but i got it. i then went online and did the online edit. WORKS perfect!!
Thank you.
thanks to everyone on the site, still posting questions, learning, and passing on information on the site.
James
 

Similar Topics

Hi all, While i am not new to omron, i'm totally new to the analog part and lost. i have a CJ2M cpu 33. then there are 4 i/o cards card 5 is a...
Replies
26
Views
2,584
Hello everyone, Today i have been tasked with creating a program in cx-programmer to keep a ramp at a certain angle as a tide comes in and out by...
Replies
6
Views
3,252
Has anyone done SMS messaging from an Omron CJ2J-CPU31 PLC? If so could you help please. Omron here in Oz have not had any experience doing this...
Replies
5
Views
137
I have an old plc in the system I have, moxa nport was used to communicate with scada, I want to replace the plc with cj2m cpu33 and eliminate...
Replies
1
Views
63
Hi all, i have 8 CJ2m plc units that show different numbers on the plc display and i am stuck on reading the info. my unit has an ip address of...
Replies
3
Views
100
Back
Top Bottom