LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

problem in reading newest file

I am trying to open and read the newest file under one directory. I got this error message every time a new file has been added. It says: Error 1 occurred at Read File. Possible Reason(s): LabVIEW: an input parameter is invalid. NI-488: command requires GPIB controller in charge.

In the program, first I find the newest file path, then open the file , read and close the file before next iteration.

Thank you.

Etain
0 Kudos
Message 1 of 12
(4,191 Views)
Post a simplified version of your vi, and somebody will help you.

CC
Chilly Charly    (aka CC)
Message 2 of 12
(4,186 Views)
Attached is a simplified version for my problem.

The weird thing is that this version runs well on my local machine. But when I run it on my remote machine( controlled by using VNC) Error 8 appears. It says: Error 8 occurred at Open File. Possilbe reason(s): LabVIEW: file permission error. NI-488:DMA hardware error detected.

The orginal version also looks good on my local machine. but error 1 occurred on the remote one.

For the remote machine, the system will conticuously add records into files and generate a new file once a while. When I test the version on my local machine, I only manaully create new files.

Thank you.

Etain
0 Kudos
Message 3 of 12
(4,175 Views)
What happens when the vi is run directly on the remote machine (not launched via the net) ?

I made some mods to your example.
May be the most significant change is the wait delay added in the main loop (that was running full speed). Other mods are diagram cosmetic changes to follow LV good wiring practices, and a more straightforward way of looking for the most recent file.
As it was, the original vi was continuously overwriting a copy of the most recent file. Is that what you intended to do ?

CC
Chilly Charly    (aka CC)
0 Kudos
Message 4 of 12
(4,165 Views)
Thank you for your effort!

I ran your code on the remote machine. It works! The previous problem didn't come up. I will modify the original one. But in the original, it also has wait delay. I'll see.

I have one more question: today after I upgraded LV7.0 to 7.1, my existing file broke. It says some of the wire mismatch may be caused by an older instance of the Image data type. To fix it, I need to replace the instance with the IMAQ Image.ctl type. Is it correct? and shall I do it one by one?

The remote machine is controlled by WinVNC ( Virtual Network Computing system). It will allow users to remotely view and control their Windows desktop.

Thanks!
etain
0 Kudos
Message 5 of 12
(4,147 Views)


@etain wrote:
...the wire mismatch may be caused by an older instance of the Image data type. To fix it, I need to replace the instance with the IMAQ Image.ctl type. Is it correct? and shall I do it one by one?



There is a "convert" function somewhere to do this automatically, but I don't remember where.
CC
Chilly Charly    (aka CC)
0 Kudos
Message 6 of 12
(4,139 Views)


@chilly charly wrote:


@etain wrote:
...the wire mismatch may be caused by an older instance of the Image data type. To fix it, I need to replace the instance with the IMAQ Image.ctl type. Is it correct? and shall I do it one by one?



There is a "convert" function somewhere to do this automatically, but I don't remember where.
CC




The utility to upgrade the LabVIEW Image control is found in the National Instruments\Vision\Utility directory. This will upgrade IMAQ and Vision related VIs to the LabVIEW 7.0 image datatype.

Regards,
Colin C.
IMAQ/Motion Applications Engineering
Colin Christofferson
Community Web Marketing
Blog
Message 7 of 12
(4,113 Views)
I cann't find National Instruments\Vision\Utility directory. The vision CD which I have has folders such as IMAQ, IMAQCFG, VA,VisionLV,lvbroker, lvrte, MAX, etc. My problem happened when I updated LV7.0 to LV7.1.

Thank you.
Etain
0 Kudos
Message 8 of 12
(4,104 Views)
I apologize I was not a little more clear. The directory about which I was speaking will be present on your hard disk if you have vision installed. The National Instruments directory will be in your Program Files directory.

Regards,
Colin C.
Applications Engineering
Colin Christofferson
Community Web Marketing
Blog
0 Kudos
Message 9 of 12
(4,098 Views)
Thanks. I found it. The convert VI works perfectly!

But when I ran the code. There is an errow message saying: "Error -1074397179 occurred at IMAQ Grab Acquire.vi" . One part of my code is about to get the vedio image from a camera. This error message appeared before only when I forgot to turn on the camera or the connection was loose. Any advice?

Thanks again.
etain
0 Kudos
Message 10 of 12
(4,093 Views)