From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Check Scan for NI435X and elapsed time doesn't run in loop

Dear all Labview Experts

i have 2 questions

(1) i written program with Check Scan for NI435X (input to no of scan to NI 435X read ) and one with only NI435X read( to read in voltage) with constant input to no of  scan,

the data i obtained is attached in 2 doucments; With Check Scan and without check scan ( the left column is temperature read in ( a formula is used to convert volt to temperature, right column is time)

strangely the program with check scan shows values in negative ==> Voltage read in is 0, strange, why is this so??? and why is there a diff?? Hope u understand my question

(2) For elapsed time, i want to find the total elapsed time for the whole program as well as individual cases,  there is no "running"  elapsed time or individual running time,

what happen is that when the each case end, the time will jump (e.g. from 0 at start, it will change to 5.35 at end of case) , is there any where to make the time run, i need it because some case required
c
ondition such as case will move to next after 5 seconds, but if above case happen, the vi will only stop if i put >= 5 rather than just place = 5
hope u understand,

does it help if i placed the condition as another loop , will it mean the same things


Attach are vi and some doucments, however as my vi contains PID tool kit as will as ni435x ni DC power which cannot be opened if you do
not have these kits.......however mayb u can help to look at the portion of timing as this is the main problem i faced now.........

Hope it is not too confusing for you to understand me...........

i can only attach max 3, the next post i will attach 2 vis...........
0 Kudos
Message 1 of 13
(3,674 Views)
Let me noe of any claification you need

thks in advance
0 Kudos
Message 2 of 13
(3,667 Views)

Hello yongster.

I was able to open up both of your attached programs (V5 and V6) and am not able to tell a difference immediately.  Could you please point me to where this difference is?  I tried searching for a 'check scan.VI', but was unable to locate one and am not sure that this is a VI in the 435x driver.  I also checked both programs for a 'check.VI', but was unable to locate one of these either.  Please post what case of your case statement holds this difference and confirmation that the VI is indeed called 'check scan'.  The entire VI name will make it much easier for me to search for it in your program. 

In regards to your timing question, you could get the time at the very beginning of your program so you always have a reference time.  This would allow you to get the current time whenever you wanted, and then subtract it from the beginning time to get the time elapsed. 

I look forward to helping you with your application.  Have a great day!

Brian F
Applications Engineer
National Instruments

0 Kudos
Message 3 of 13
(3,632 Views)
Thks Brian

Attached are 3 VIs

1.the first vi is the one with the check scan
2. the next two vi the only diff is the placement of the where i put the elapsed time and time of each case.........(without check scan)--the first
one is within the big loop, the other outside  big loop -- the purpose i did this is because when i run the vi with the timing in the big loop, the timing does not run continuously but "skip". for e.g. Denature time: from 0 . it jump to 5.15s without showing the running.............

i will attached another 2 vi s in my next attachment

Hope this clarifies a bit

your help is really appreciated

thks

0 Kudos
Message 4 of 13
(3,624 Views)
Download All
0 Kudos
Message 5 of 13
(3,621 Views)

hi

i not sure will this help also

when i run the vi with the ni 435X check scan vi, i attached an indicator to see how many scan no it input to the NI435X read vi, the return value is 16

so i try to input 16 as a constant value into NI435X read vi (without the use of check scan vi), however

the data that is read is the same as attached in the previous mail-i.e.with check scan-presence of -ve values

 

without check scan, no -ve values but very much less readings.......

 

thks

0 Kudos
Message 6 of 13
(3,617 Views)
Hello yongster.  Thank you for your update.  I have reviewed your code and am also a bit puzzled by why feeding the 'Scans Available' output of the 435x Check VI doesn't produce the results you desire when fed into the 'Number of Scans' input on the 435x Read VI.  I have examined some example programs, which are avaliable at www.ni.com, that use these same VI's.  One that I found of particular interest is the '435x Fast' VI, which can be downloaded at:
 
Maximizing Acquisition Rates with the NI 435X Data Logger Board
 
The '435x Fast' VI is contained in the 4561.zip file which can be downloaded at this website.  This VI uses the same approach with the 435x Check VI and the 435x Read VI that you are using.  So, in order to isolate the issue that we are seeing, I would recommend using this program to test the functionality of your 435x and the corresponding VI's.  This step will allow us to find out if the problem lies in the 435x VI's or in some other code that is external to those particular VI's in your program. 
 
Let us know how this goes so we can assist you further!
 
Brian F
Applications Engineer
National Instruments
0 Kudos
Message 7 of 13
(3,602 Views)

Hi Brian

there is a few things which i tried

i tried to put "wait" state in the loops

ranging from wait 100ms to 1s

the attached are the data i obtained

seems that by putting wait = 1s, it helps to prevent negative reading

with decreasing wait time, more -ve reading is being read

i also discovered though not sure, sometimes the negative values seems to appear when one case is completed and "moving" to the next case...........

does this look reasonable to you, and is it rite to do it this way??

thks

(BTW, the data in attachment is temperature, setpoint, time, no of cycles

0 Kudos
Message 8 of 13
(3,594 Views)
Hi
with regards to the previous reply,heres the vi.........

i also tired to use constant ( i used value 1 and 5 to see whats the diff) to input in NI435X read vi instead of using scan check vi

heres is the attached data.................
0 Kudos
Message 9 of 13
(3,592 Views)
Hello yongster,

I would suggest an alternative example for you to try.  Please try running the example Measure Voltage (with Accessory).vi.  It is installed by the NI-435x driver to the directory C:\Program Files\National Instruments\LabVIEW 7.1\examples\instr\ni435x\Measurements.  Since we know that this example works, let's start from there and see if you can reproduce the same behavior.  If so, we can continue troubleshooting from there. 

Best regards,
0 Kudos
Message 10 of 13
(3,579 Views)