Sign in to follow this  
Followers 0
toletondano

CP1E + MAD01

6 posts in this topic

Hi! I have a question about addressing analog module in CX-Programmer. In manual, it says the first analog input address begin from the last CPU unit address and so on for the second one. In this case, the last input address in CP1E N30 CPU unit is 1.05 then first analog input address should be 1.06. I tried to write the range in analog input using MOV instruction with the source is #FF00 (input range 0-10V) and the destination is 106. I moved 106 to D1 so i can see the value but i doesnt show anything. What should i do? Is the address correct? Sorry for my bad english. If someone have an answer and maybe even a programming example to upload I would really appreciate it. Best Regards!

Share this post


Link to post
Share on other sites
You are understandably confused about last CPU Unit address. It is addressed in channels (words) so the next full word begins with channel 2(word 2). Use destination 2 (not 106.)

Share this post


Link to post
Share on other sites
First of all, 1.06 is a bit address. That is, channel 1, bit 6. Therefore, the next available input word (word = 16 bits) address would be channel 2. However, the range code goes in the next available output word. Therefore, in this case, the processor has output channels 100 and 101, so the next output word would be 102. So, if you are using a CPM1A-MAD01, then you would do this: MOV #FF00 102 Note: I assume that the CPM1A-MAD01 can be used with the CP1E, but the manual is not clear on this. That expansion is specifically listed as an option for the CP1L and CP1H families, and NOT listed for the CP1E family. It may just be an effort to reduce the usage of the CPM1A part numbers.

Share this post


Link to post
Share on other sites
It worked!! Thank you so much Jay and Michael. Edited by toletondano

Share this post


Link to post
Share on other sites
Hello Jay. I have tried your instruction at the other post to scale analog value between 0-100. Now I want to scale the value between 20-30 but I cant get the right value for it. Can you give me an programming example? Thanks.

Share this post


Link to post
Share on other sites
Read about the SCL function. Scroll to the bottom and read my last post reply in this topic http://forums.mrplc.com/index.php?showtopic=27674 although you values will differ (ie the full scale of the RAW analogue input will be &255 not &4000.) and your scaled range will be different.

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
Sign in to follow this  
Followers 0