Anyone care to tear this to shreds?

Steve Kemp

Member
Join Date
Nov 2003
Posts
122
My first CX1 prog (well, a bit of it). Needless to say, I'm having some fun & games... The rung comment says it all, but when I run the simulator and load D5000 with a value of 1, the watch-window shows a value of 256 for D2 ??? And D3 is coming out as 4352 ??? I haven't set the loop running with these basic things so awry. Any comments? (other than "try taking up plumbing"). Steve.
 
don't have time to check it out but:
check out your memory usage. multiplying two 16-bit numbers will have 32-bit result and write to two registers (D2 and D3).
also check your instructions, many things in Omron have default BCD format (like your constants #100 and #1000). if you perform binary operation on BCD numbers result will be wrong.
 
*U is a binary maths instruction. The # prefix is for BCD maths. Try using the & prefix as this is for binary maths. You will find the same situation when addressing analogue outputs in the CJ/CS1 series. I giot caught the other day using # - changed to & for the prefix and the instruction worked properly.

Hope this helps.

I guess this type of thing is always a problem when going to a new brand of PLC. They all have their own ways of doing things.
 
I guess Omron's big open memory map and CX-Programmer are a bit of a challenge first time up Steve. Lots of short cuts like #, &, @, ! to make life easier but it is a matter of finding them first.

At the end of the day they are really good things, once accustomed to them. I also like the fact that there are many many things that you can program to key combinations to make life easier, much more than I have encountered in other software, particularly the European drag and drop stuff.

I use F8 for functions and for a timer, for example, just type in F8 - TIM 10 #300 for a 30 second timer number 10. Really groovy. If you set up the timers and counters to be binary (hex), use & instead of # and all is well. I do all my regular functions that way such as BCNT, APR, SFTR, > etc etc.

How are you liking the software as you become accustomed to it? Beats the heck out of anything els I have used. That includes most of the majors and many of the minors over the years.

The other thing I use absolutely extensively is the Windows calculator to convert numbers all ways - hex, binary, BCD etc. The most usefull accessory in Windows to me.

By the way, your details do not state where you are based? I do not recognise the country logo.
 
Last edited:
Well, it nearly worked. I've loaded all the "input" registers (D5001-D5019) with values and run the loop in the CX1 simulator. The loop counts ok; D4 and D5 count in sync., and when restarted, they do so as predicted (by me, at least), but nothing is being written to D1101 through to D1120. o_O Any takers?

Bob: The dragon flag is Wales, UK, although I "migrated" all of 200 miles about ten years ago from S.E. England. Yes, I'm gradually getting used to the Omron approach, but it's taking a while to strip away all the inbuilt methods of doing things the (dare I mention it?) A.B. way. :)

Steve.
 
Last edited:
Hover your cursor over anyoneā€™s country map and a little pop-up will say which country it is.

Steve is from the valleys and un-nerving for me, he has the same name as a boss on a site I go to regularly (work site, not website) with whom I have had many an altercation
 
Bob: The dragon flag is Wales, UK, although I "migrated" all of 200 miles about ten years ago from S.E. England.

Great singers there at least and I am sure there would be some Killkenny and/or Guiness in the pub. Sounds great.

I'm gradually getting used to the Omron approach, but it's taking a while to strip away all the inbuilt methods of doing things the (dare I mention it?) A.B. way.

Damn FILES!!!!! Hate 'em after a big open page of I/O and words. Too restrictive and far too many file types to remember.

Could be worse though, could be coming from Siemens!!! People either love 'em or hate 'em - as you can gather I am of the latter persuasion.

Hover your cursor over anyoneā€™s country map and a little pop-up will say which country it is.

šŸ™ƒ

Bit flash for me Steve!!! Have not gone that far down the track as I rarely use screens with generator systems and swimming pools. The only screens I really get to use these days are the older elctroluminescent types as they can be seen clearly from all angles and are specified by the consultant for the gen systems. Lot of work to get them to work let me tell you.
 
Last edited:
Ruddy Ozzies!!! I have not had to go that far with recipes (I guess that is basically what you are ding) with screens and it is beyond me due to that fact. I do not quite understand where you are heading, what you are doing or how to achieve it.

I am more into random number generation, linear approximation, lots of Device Net with explicit messaging etc etc but not much with screens. A lot of my more fancy stuff goes back to Citect SCADA - power stations - selecting diesel set duty order - load control - capacity control - linear approximation of non-linear fuel tanks etc etc. Use Citect for recipes normally.

Sorry. Hope someone else can help further.
 
Fixed it

For anyone who's remotely interested: The move function in rung 7 had the indirect addresses prefixed by * (relates to BCD addressing) whereas all the preceeding stuff is in binary format. So the correct indirect address prefix in this case is "@". Thanks to all for the suggestions. Steve.
 
BobB said:
Great singers there at least and I am sure there would be some Killkenny and/or Guiness in the pub. Sounds great.

Nope, cultural geography still needs a little brushing up there, Bob. Kilkenny and Guinness (two 'n's) come from another minuscule little country called Ireland. Now I know they're near one another from your perspective, and you could fit both Ireland and Wales in to Oz several hundred times over with plenty of room to spare, but they're not the same.

I mean, how would you feel if someone said the All Blacks came from Australia? (Ahh, OK, bad question. Right now you'd probably be delighted, especially after Wales beat you the other weekend!)

Regards

Ken

(from another tiny country that tries to punch above its weight)
 

Similar Topics

can anybody help me how to put audio signal ( analog ) into plc programming? any idea will do. i am currently researching on how to use plc...
Replies
16
Views
6,563
Hello everyone, I am currently working on a project that uses a Rockwell L33ER controller and the FTV Studio V13 as Supervisory computer...
Replies
0
Views
84
I have an old PLC (circa 2007) consisting of Telemecanique/Modicon/Schneider Electric devices. The system has developed errors and unfortunately...
Replies
2
Views
177
Need some help here (again). I tried to download my HMI to the PLC and I get this error message about a missing file. Can anyone help?
Replies
3
Views
668
Hello expert I have migrate legacy project that use Applicom OPC DA with 3rd client and S7-400. I see in client code add item string call...
Replies
0
Views
343
Back
Top Bottom