LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Zip. Labveiw and Matlab in Parallel

i am running Labview 2012a and matlab R2013a executables in parallel, as parts of larger analysis programs. each runs a zip app writen using the built-in subroutines provided by the two companies. each program runs fine *independently.* when run simutaneously, Labview at low prioritiy and natlab at normal priority, both apps ran fine for a few minutes, then they both froze. After I killed the Labview app, the matlab app resumed. when matlab completed, i killed it - and the Labview app was re-started and ran fine. i would like to run these programs 24/7 in parallel - without them clashing.

 

1) is there something i can do to keep these 2 apps from clashing?

2) it is my belief that both packages use JAVA for zip functions.  is that correct?

3) The operating system is windows 10 home premium. is there something at the system level that needs to be set?

4) perhaps i need to use a system call to see if java is already running zip, if so, wait..

 

thanks for your time and efforts.

 

 

0 Kudos
Message 1 of 15
(1,745 Views)

1) is there something i can do to keep these 2 apps from clashing?

Race condition - there is not reentrant resource that does not allow to be called from 2 different places. 

Try to make 2 labview projects, check if they have same problem. It is easier to design communication interaction within the same environment. After you understand how long you need to keep access opened, how to switch between applications - go to Matlab, do the same communication there.

Is zip - an archive, or something else? 

Then you should not have problems archiving _different_ files from different environments. If you are opening the same file from 2 programs, you might have troubles.

2)  it is my belief that both packages use JAVA for zip functions.  is that correct?

Labview works with zip, I doubt it calls java, too basic task. If you are accessing your subroutines that use java to access zip, then yes - you are through java.

3)The operating system is windows 10 home premium. is there something at the system level that needs to be set?

I doubt it is windows problem. If it is, I would be glad to know - not to go to win10 as long as i can.

4) perhaps i need to use a system call to see if java is already running zip, if so, wait..

I doubt it is java problem. Most probably your programs or that subroutines are accessing the same file. Simple way - create empty "lock" file next to zip and delete it after matlab or labview releases access to this file.

0 Kudos
Message 2 of 15
(1,712 Views)

Thanks for response... here's a bit more detail.

 

1) Normal operations have processing apps working on 2 separtate disc, so there is no chance of  them accessing a file jointly. Both apps are doing their own zip operation. These apps seem to *not* clash... however, they need to run for a few more days to ensure that they are robust...  zipping occurs about every 10 minutes on each disc.

 

2)  the clash occured when i ran a matlab unzip app on the same disc that was doin labview zip. no shared files or directories. both apps ran for several minutes... then the clash,which was resolved by killing the labveiw app... matlab finished task... labview ran normally when re-started. i should probably change the matlab unzip to a labview unzip app.

 

3) i need normal operations to run robustly... which may in fact be happening as is... maybe just cleaning up special ops is the solution.

0 Kudos
Message 3 of 15
(1,704 Views)

What happens if you call the matlab code from the matlab script node in LV?

 

As a heads up, I doubt compatibility is your problem.  But, 2012 isn't supported on Win10 and I'd be surprised if Matlab is supprted there also.

0 Kudos
Message 4 of 15
(1,698 Views)

ah ha! good catch on labview 2012 and windows 10. thanks...

time for me to move up to current software.

see: http://www.ni.com/labview/os-support/

 

i prefer not to call matlab from labview... over the years the  link has changed too frequently for me to keep up with software mods.

 

my analysis apps are running parallel and accessing separate discs and seems to be no problem..

so that will be the standard configuration for modulas that use zip.

 

i have run matlab and labview apps in parallel, accessing only one disc for years without problems...

so the  issues i'm had were surely related to the zip\unzip function implementation - which locked up apps, even though the apps point at different directories on the same disc

 

my operational code runs fine with 2 drives,

so this one drive zip issue has become more of a curriosity than an immediate concern.

thanks for your time and input.

0 Kudos
Message 5 of 15
(1,654 Views)

Well, how many R/W heads to you expect on each disk?


"Should be" isn't "Is" -Jay
0 Kudos
Message 6 of 15
(1,646 Views)

very interesting question... 1 active read or write head at a time... that was likely what i was observing.... i had thought that there would be splicing  - maybe that didn't happen in this case becausethe higher priority app grabbed the hardware and shut out the lower priority app... i just didn't give the 2 apps time to run till completion... might get different results if both apps have same priority.

0 Kudos
Message 7 of 15
(1,638 Views)

yet upon further reflection... the higher priority app suspended disc write until i physcally ended the lower priority app...at which time it continued... what caused the higher priority app to suspend operation? neither was writing to disc...they were suspended - till i took action.  so i'm still puzzled

0 Kudos
Message 8 of 15
(1,633 Views)

It seems to me that your zip library is locking some resources and is not designed to be used in parallel.

 

Maybe on the LabVIEW side you could use the zip tools that are part of LabVIEW instead. Have you tried that?


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 9 of 15
(1,627 Views)

on Labview side, the code uses native Labview zip functions.

on Matlab side, the code uses native Matlab zip functions.

can windows lock the zip resorces?

if so, how to check of that...

 

0 Kudos
Message 10 of 15
(1,605 Views)