Mendon Systems Posted March 15, 2015 Report Posted March 15, 2015 (edited) 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 March 15, 2015 by Mendon Systems Quote
BobB Posted March 15, 2015 Report Posted March 15, 2015 Have never seen that - maybe cause it is always on? Perhaps only that function does it? Quote
Mendon Systems Posted March 15, 2015 Author Report Posted March 15, 2015 Well if you have never seen it before then I don't feel so bad! I thought it was just me! Quote
ECSI Posted March 15, 2015 Report Posted March 15, 2015 Set the data type of each operand to WORD. The =DT instruction is looking for that type. Quote
Mendon Systems Posted March 16, 2015 Author Report Posted March 16, 2015 I just tried that. It didn't make any difference. Quote
ECSI Posted March 16, 2015 Report Posted March 16, 2015 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 Quote
Mendon Systems Posted March 16, 2015 Author Report Posted March 16, 2015 (edited) 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 March 16, 2015 by Mendon Systems Quote
ECSI Posted March 16, 2015 Report Posted March 16, 2015 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? Quote
Mendon Systems Posted March 16, 2015 Author Report Posted March 16, 2015 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?? Quote
Michael Walsh Posted March 16, 2015 Report Posted March 16, 2015 I have no reasonable explanation for this. I agree that you are not doing any of the cases specified in the manual text. Quote
Mendon Systems Posted March 16, 2015 Author Report Posted March 16, 2015 Thanks Mike! I guess I'll just chalk this one up to CX-P wierdness. At least it's a harmless quirk. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.