thanya Posted September 28, 2012 Report Posted September 28, 2012 (edited) Dear Expert Please check program for me. I can not read analog value from Q64AD and I can not send analog value out by Q64DAN Thank a lot Edited September 29, 2012 by thanya
BAK96 Posted September 30, 2012 Report Posted September 30, 2012 Have you enabled your channels and set up parameters through the PLC program or by GX Configurator AD?
panic mode Posted October 2, 2012 Report Posted October 2, 2012 you need to initialize cards before they can work. i would say get manuals for both cards and read them, then you should have no problem getting this to work. for example 64AD card will need to have variety of buffers set. also you should not copy continuously conversion results because the data in those buffer may not be ready. when conversion is complete, you will get "conversion complete flag". for example reading should be something like: LD SM400 MOV H0 U0\G0; enable conversion on all channels LD X00F MOV U0\G19 D5 ; read Error Code if present LD SM400 MOV U0\G10 D0 ; read conversion flags LD D0.0 MOV U0\G11 D1 ; if first channel converted, copy value LD D0.1 MOV U0\G12 D2 ; if second channel converted, copy value LD D0.2 MOV U0\G13 D3 ; if third channel converted, copy value LD D0.3 MOV U0\G14 D4 ; if fourth channel converted, copy value Same goes for outputs, you need to enable channels in some three places or so. NOTE that header address is only word level (always remove last digit, here it is U1 and not U10) LD X01F MOV U1\G19 D6 ; always first read Error Code if present LD SM400.... (turn outputs to enable channel: Y11, Y12...), MOV H0 U1\G0 ; you need to enable conversion MOV D10 U1\G11 ; eventually send value to a channel note this is not necessarily 100% correct or complete, I have no time to look it up but it should give you an idea
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now