LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Pressure Measurement Program

Hi Friend,

 

I need assistance bit in my labview program. I am using the labview to build the pressure measure for my experiment. I am using the parascientific digiquartz pressure sensor for the measurement.

Parascientific Pressure Device Manual: https://paroscientific.com/pdf/8819-001_Digiquartz_Operations_Manual_for_RS_485_RS_232_Products_715_...

 

a. I have few issue in my program, its diffcult to get the same port upon the restart of the computer. I am using the PXle 1078 Instrument for my work. It has bus port which have several RS232 inlets port for receiving the signal

b.  In few occassion I am taking the measurement, it looks the measurement in the real time but some time there is lag in the system. Even when the pressure is getting down, it take some time to see that. I am not sure, why this is happening. Any suggestion this is very important. 

c. I am looking for the below output for my experiment and looking if the time can be the real based stopwatch not the cpu one. 

 

skdubey_0-1686594138573.png

 

I have attached my program for your assistance thanks

 

Thanks

 

0 Kudos
Message 1 of 8
(936 Views)

Check this video about proper way to communicate with serial port.

 

https://www.youtube.com/watch?v=J8zw0sS6i1c

 

it may be struggling to read data after sending a write command. 

You may consider using a function to monitor the number of bytes at the port and only reading it before it gets to a threshold.. 

 

0 Kudos
Message 2 of 8
(920 Views)

Hello skdubey

 

a. Windows will assign a COM port to a serial device and keeps an internal record. If the devices have a unique identifier, they should keep the same com ports. That being said, some vendors use the same id for all their products and Windows doesn't have a way to differentiate them anymore. I believe if you go above some number (100 perhaps?) serial adapters saved, Windows will start to recycle ports. You might be able to do some "smart" programming and try to find unique and persistent value for each transmitter.

 

b. It's hard to say where the delay is. 9600 is a pretty slow baud rate, and maybe it's just the delay in transmitting the digital data. However, if I were a betting man, I would bet that the pressure transmitters have some averaging that takes a while to get to a "true" value. I have worked with some of those transducers and from what I remember you could go all the way up to a 2 second delay in the reading if you wanted very high accuracy.

 

c. You have tagged the LabVIEW Real-Time Module here, but isn't the PXI chassis just a chassis and not a real-time target? I may be wrong here, not too familiar with those products. I think ideally you would want to get some kind of time data from the transmitter at the same time you read the data, but I am not aware of any such register. If you split the three devices into their own loop, you might be able to get better time stamp data as each loop would run independently and not have to wait for everything else in the loop.

 

Working on a similar problem in regards to getting very high accuracy timestamp data, I wish you the best of luck!

 

 

 

0 Kudos
Message 3 of 8
(874 Views)

Hi Steven 

 

I will try with the 2 second delay and see what happen.

 

Also, when I increase the number of transducer for the pressure measurement within the same program. I just copy the same icon, and get the result but with delay. Is it due to the program is awaiting for the input data from the pressure device as the number of pressure transducer increase. any suggestion on those?

0 Kudos
Message 4 of 8
(841 Views)

Right now you have one big loop that does everything. A new iteration of the loop will not start until everything is done in that loop, including any time it takes for the visa read/writes to finish. If you give each piece of hardware its own loop, then each loop can run without being time dependant on everything else. 

0 Kudos
Message 5 of 8
(824 Views)

Oh, okay. I can try and see if I can provide a separate loop for each pressure measurement transducer. I am just concerned about the timing and how I will control it. Can I create one big loop and include the three pressure loops within it? Will that be workable? In this case, the time will be in the outer loop.

0 Kudos
Message 6 of 8
(820 Views)

There are a dozen different ways to implement separating the loops and how to synchronize the stopping of them. Use what works for you, my main point is that you don't want communication of one transmitter to be dependent on the others if you are trying to get high accuracy time.

0 Kudos
Message 7 of 8
(816 Views)

Having all the code in one loop, as it was answered before, will make the program to wait for all the code to be ready in order to execute another iteration. 

 

It's hard to define where the delay is happening, and depends on how fast you need the system to run. 

 

As a suggestion, you can do one transducer only and characterize how much time you need to read each iteration. Remove the file IO to avoid time in accessing the drive or test and measure how much time with and without file IO. Use a FOR loop instead of WHile and run for 100 times to average the time. 

 

Parallel Loops: they will run independently , but then you need to synchronize the operation and writing data to ensure that they are saved properly.

Check a template called Producer Consumer(Event)

Think about an orchestra, the main loop with user interface will act as a conductor, then each parallel loop will act as an instrument.

Each loop will deal with one transducer will wait for the command from the producer, then execute send command and read the response, then send the response to the Save data loop. 

 

The Save data loop will wait for all the data being available before writing the data into the file. 

 

 

0 Kudos
Message 8 of 8
(756 Views)