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: 

Where has my semaphore type def gone?

Solved!
Go to solution

Hi All, I have a perplexing problem involving a semaphore strict type def indicator. I'm using LV2011 SP1.

 

I have recently loaded multiple versions of a job which a collegue developed about 10 years ago on my computer. I have been experimenting with the latest version, mainly as an exercise.

Naturally I have backups of all the code, and the one I was working on was actually a special, renamed copy just for safety.

In all there are 6 separate labview projects covering several generations of the job, and they all ran.

 

One of the things I was looking at was the use of two semaphores. These are utilised by obtaining a semaphore and then putting it into a hidden indicator. When the semaphore is needed a ref to the indicator and a property node are used to retrieve the semaphore for aquire and release. Now labview actually creates a strict type def, instead of a plain indicator when you do this. This type def comes from the Semaphor.llb in the utility folder of the VI library.

 

In my experimenting I had disconnected the indicator from the type def, turning it into a plain indicator. This broke the VI, so I tried to undo the disconnection. This did not work. No problem, I thought.

I closed the VI without saving it, and reopened it expecting to find the type def back in place. It wasn't. I then looked further to find why the VI was broken and discovered that all the semaphore references had disappeared from the block diagram. In fact, the refs to both semaphores (I had only changed one) were missing.

 

I still was not too concerened as I had lots of back ups available to me. But when I looked at more VI's I discovered that every copy of the VI in every project was now broken in exactly the same way.

Next I repaced them all with backups from our backup system, but again every project I ran was broken in the same way.

 

Next, I got out an old laptop with labview installed and ran the backups on that, without any problems.

I then went back to my original broken experimental VI and replaced the missing refs with new ones to the normal semaphore indicators and the VI ran again.

 

If I create a new semaphore and indicator on the laptop it creates a strict type def, which seems to be correct. But if I do it on my computer it only creates a normal indicator.

It seems as if somehow labview has lost the ability to link to the type def in the semaphor. llb (it is still there, I checked). I also tried to create an ordinary indicator and replace it with the type def in the llb. I can find the type def, but it can't replace with it.

 

Another thing I tried was to create type def indicators in a VI on the laptop then copy the VI to my computer. The indicators became normal ones on my computer.

 

I'm pretty sure that if I uninstall and reinstall Labview things will come right, but I hope that there's an easier and faster way. It has been suggested to me that somewhere there is an option for choosing what type of indicator is produced which I have somehow changed, but if so I can't find it!

 

Hopefully somebody will know how to help fix this problem.

 

Jonathan.

0 Kudos
Message 1 of 3
(2,998 Views)
Solution
Accepted by topic author pretech

I have not used semaphores, so I am not familiar with that particular .llb file.  I'm somewhat surprised it is creating strict typedefs.

 

My thought is that sometime you accidentally changed the typedef status of that reference and it got resaved into the .llb file.  Look at the files dates of the semaphor.llb on your problem computer and the computer that is behaving okay.  That might tell you.

 

Try copying the semaphor.llb file from the working PC over to the PC that is having the problems.  (Do it with all your files and LabVIEW closed just to be sure there is no accidental cross-linking errors.)

Message 2 of 3
(2,967 Views)

Thank you RavensFan! That worked perfectly!

 

Jonathan.

0 Kudos
Message 3 of 3
(2,939 Views)