Sign in to follow this  
Followers 0
Mendon Systems

OK ... why does CX-P do ths?

11 posts in this topic

I wrote a simpilistic rung which tracks program downloads and online edits. The =DT(341) function always shows up as yellow instead of green in CX Programmer, but I can't find a description in any of the documentation about what the yellow color actually means. The rung works fine, but the weird color has been bothering me for a while so I thought I would ask to see if anyone knows the answer to this. Edited by Mendon Systems

Share this post


Link to post
Share on other sites
Have never seen that - maybe cause it is always on? Perhaps only that function does it?

Share this post


Link to post
Share on other sites
Well if you have never seen it before then I don't feel so bad! I thought it was just me!

Share this post


Link to post
Share on other sites
Set the data type of each operand to WORD. The =DT instruction is looking for that type.

Share this post


Link to post
Share on other sites
I just tried that. It didn't make any difference.

Share this post


Link to post
Share on other sites
It worked for me. I've had it happen to me before but I can't remember what instruction it happened on. Also from the manual:
1 person likes this

Share this post


Link to post
Share on other sites
OK!! That explanation you found in the manual does explain what it is doing. I'm a bit curious where you found that. I have been looking for a couple of weeks but never came up with that explanation. I'll have to go back and look again. edit: Found it!! I searched the CX-P manual for "yellow" and it popped up in the introduction section! Edited by Mendon Systems

Share this post


Link to post
Share on other sites
Sorry I should have provided a link to the manual for you. Glad you found it. http://forums.mrplc.com/index.php?app=downloads&showfile=1027 But how does that explain what is happening for you? You aren't using indirect addressing are you? Not that I'm an expert since I don't think I've ever used indirect addressing. And why does the yellow disappear when changing the data type to WORD?

Share this post


Link to post
Share on other sites
No, it is not indirect addressing and it is also not referencing either the DM or EM area so it doesn't entirely agree with the description in the manual . Changing the data type doesn't seem to have any effect either. The actual data type is probably UINT_BCD although that is not what it really is because it is actually two 2 digit BCD numbers packed into one word (hi byte, lo byte). At least now I know what the yellow symbol means even if I can't explain why CX-P decided it needs to do that with the =DT instruction. Maybe Mike Walsh or Jay Anthony has an answer that makes more sense??

Share this post


Link to post
Share on other sites
I have no reasonable explanation for this. I agree that you are not doing any of the cases specified in the manual text.

Share this post


Link to post
Share on other sites
Thanks Mike! I guess I'll just chalk this one up to CX-P wierdness. At least it's a harmless quirk.

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