dunc

SD registers?

10 posts in this topic

cant seem to find much info on this?

i know a lot of the SD registers are for system related functions, but i believe there are some user settable ones?

we have a piece of software using SD270 to store a totaliser figure. this is then copied to D270. is there any reason for doing it this way? are SD registers retentive when the power is cycled?

could someone please explain?

 

thanks
Duncan

Share this post


Link to post
Share on other sites

I suspect that SD registers are non retentive which is probably why the value was written to the data register D270. A latch range can be set for these devices to retain its value on power cycle.

My reasoning is because I use SM414 and 415, modifiable timers when moving a value to their corresponding SD registers. When I cycle power they revert to the default K30.

Share this post


Link to post
Share on other sites

So you are reading out SD270 "I/O No. of the mounted MELSECNET/10 module"?

SD registers depend on the ranges, e.g. the clock is retentive while actual error information is not retentive, while error history is retentive and so on...

If you look at the manual it states that SD270 is "S (Initial)" since my guess is that the module information is read from the PLC during startup.

I'm curious: Why are you reading out SD270?

Share this post


Link to post
Share on other sites

i have attached the piece of code which should hopefully make more sense.

thanks

Duncan

Untitled.png

Share this post


Link to post
Share on other sites

Don't think you are supposed to write to those addresses.

Share this post


Link to post
Share on other sites

Correct: Those are SET by the system. Most of the SD/SM devices are system devices and not to be used without special instructions (e.g. clock read/write instructions), so just don't use them at all.

Share this post


Link to post
Share on other sites

So the moral of the story is, I should slap the programmer who wrote this bit of code! It is a relatively newly installed  piece of plant and I got complaints of counters resetting when we had any power outages.

Thanks for clearing that up

Share this post


Link to post
Share on other sites

Yes, I would slap him (hard). I have no idea why someone would do this. I've attached a screenshot from the general manual, which clearly indicates that the SD270 is a "System initiated" variable.

As a general rule: NEVER access SD/SM devices directly. IF one should access them in any way, use the special instructions that are available for a tiny part of them (like clock read/write functions).

SD.png

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now