Quantcast
Channel: LabVIEW topics
Viewing all 67219 articles
Browse latest View live

Vector subtraction

$
0
0

To All,

This is not really a Labview  question, per se.  I am attempting to subtract one vector from another.  I have attached the vi.  The numbers look like they work fine for vectors that are directly in or out of phase.  However, when the vectors are something in between, the largest vector seems to be 'pulled' in the opposite direction from what I would expect.  For example, if the run vector is 4 @ 90 degrees, and the slow roll vector is 1 at 30 degrees, I would expect the resultant vector to be less than 90.  But the answer is more than 90, in this case 103.9 degrees.  I am missing something very simple here but can't see it.


Quick frequency measurment with an HP 53131A Universal Counter

$
0
0

Hello everybody,

 

I have some issues with the measurement of a frequency. When I have 0 Hz my HP 53131A show some randoms big values. Yes I want to measure in discontinue, I don't want some measurement time or time out. I already dig the whole programming guide of the counter, and he didn't help me. 

 

Sorry for my english btw I try my best. 

Difference between sample rate and no. of samples

$
0
0

Hi all,

     I need to be get cleared of, what is the difference between sample rate and no. of samples?

     Here for example, i have a signal wave signal generation function and in that it has Frequency, amplitude and No.of samples and Sampling rate.

 how i can differentiate between frequency and sample rate and no.of samples?

pls explain it in very simple.

thank you in advance.

Dinesh

 

Labview DataSocket and OPC UA?

$
0
0

Hello,

Long time user of Labview 2012 + DataSocket to Access OPC server data, I am facing this new issue:

  • I need to connect to Siemens TIA Portal series (for instance the 1500 serie that has an embedded OPC UA server) using symbolic addressing
  • On the NI website I read that DataSocket are not compatible with OPC 3.x. Is OPC UA synonym with OPC 3.x?
  • I also see that there is a Labview OPC UA Toolkit 2017, does it have DataSocket that are able to communicate to OPC UA servers?

 Sorry things are a little bit confusing in my mind, hopefully someone might clarify it. I would be sad to abandon the DataSocket path that is working well for years now and for all other kind of PLC connections that I had to face.

Thank you very much

Christophe

Hide the Radio Button Container

$
0
0

Is there any way to hide the Radio button Container? Why do Radio Buttons only come with a "Modern" container? I have tried making it transparent but there is always container artifacts left over. 

 

The "Modern" controls and indicators with their sunken frame remind me of the 1970's when every "Modern home" had a sunken living room, in other words it looks very dated.

 

RBCapture.PNG

Now I think I remember why I never used Radio Buttons all these years

Advanced Serial Port configuration

$
0
0

I am troubleshooting communication between a product and LabVIEW using the serial port.

 

I have a tool created by the engineering team for debug that was written in C, that works.  

 

I have found a work around, I install the Keysight IO Library as a secondary VISA, and then I can use LabVIEW just fine to communicate to the device.  But I shouldnt have to do this, since this is a simple configuration.

 

serial configuration.PNGSerial Port Config

 

Another observation using the Device Monitoring Studio when looking at the Serial Port Lines. 

 

Engineering Tool:  RTS and DTR are green, CTS, DSR, DCD and RI are red

LabVIEW: RTS and DTR are green, CTS, DSR, DCD and RI are grey

 

Question: How can I correctly set the values to match the debug tool, since I have been unable to locate the properties via LabVIEW ?  Queue Length, Flow Control, timeouts, wait mask and clear DTR.  It also seems the CTS, DSR, DCD and RI are set to unasserted, but the help file seems to indicate that NI only allows that via NI Serial hardware, and I am using a stock serial port on the PC.

 

Below are the differences between the two tools when checking the serial port lines.

 

Engineering Tool Debug:

 

000075: I/O Request (DOWN): 2018-09-21 08:39:10.4101856 +0.0000016
IOCTL_SERIAL_SET_HANDFLOW: Set handshake information
· Control lines = 0
· Flow control = 0
· Xon Limit = 1024
· Xoff Limit = 1024

 

000079: I/O Request (DOWN): 2018-09-21 08:39:10.4102112 +0.0000032
IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts
· Read interval = 4294967295
· Read total multiplier = 4294967295
· Read total constant = 5000
· Write total multiplier = 0
· Write total constant = 5000

 

000083: I/O Request (DOWN): 2018-09-21 08:39:10.4103872 +0.0001264
IOCTL_SERIAL_SET_QUEUE_SIZE: Set queue size
· Input = 1024
· Output = 1024

 

000081: I/O Request (DOWN): 2018-09-21 08:39:10.4102592 +0.0000464
IOCTL_SERIAL_SET_WAIT_MASK: Set wait mask
· Wait Mask = SERIAL_EV_RXCHAR | SERIAL_EV_RXFLAG | SERIAL_EV_CTS | SERIAL_EV_DSR | SERIAL_EV_RLSD | SERIAL_EV_BREAK | SERIAL_EV_ERR | SERIAL_EV_RING (0x1fb)

 

Following commands are not not seen in LabVIEW Debug:

000097: I/O Request (DOWN): 2018-09-21 08:39:10.4104480 +0.0000016
IOCTL_SERIAL_CLR_DTR: Clear DTR


000098: I/O Request (UP): 2018-09-21 08:39:10.4104560 +0.0000080
IOCTL: IOCTL_SERIAL_CLR_DTR (0x1b0028)

 

000082: I/O Request (UP): 2018-09-21 08:39:10.4102608 +0.0000016
IOCTL: IOCTL_SERIAL_SET_WAIT_MASK (0x1b0044)

 

000090: I/O Request (UP): 2018-09-21 08:39:10.4104048 +0.0000000
IOCTL_SERIAL_GET_CHARS: Retrieve special characters
· EOF = 0x1a
· Error = 0
· Break = 0
· Event = 0x1a
· XON = 0x11
· XOFF = 0x13

 

LabVIEW Program:

 

000051: I/O Request (DOWN): 2018-09-21 09:37:53.3273936 +0.0000000
IOCTL_SERIAL_SET_HANDFLOW: Set handshake information
· Control lines = SERIAL_DTR_CONTROL (0x1)
· Flow control = SERIAL_RTS_CONTROL (0x40)
· Xon Limit = 64
· Xoff Limit = 64

 

000055: I/O Request (DOWN): 2018-09-21 09:37:53.3274016 +0.0000016
IOCTL_SERIAL_SET_TIMEOUTS: Set timeouts
· Read interval = 4294967295
· Read total multiplier = 0
· Read total constant = 0
· Write total multiplier = 0
· Write total constant = 500

 

000053: I/O Request (DOWN): 2018-09-21 09:37:53.3274000 +0.0000016
IOCTL_SERIAL_SET_QUEUE_SIZE: Set queue size
· Input = 640
· Output = 640

 

000064: I/O Request (UP): 2018-09-21 09:37:53.3274240 +0.0000016
IOCTL_SERIAL_GET_CHARS: Retrieve special characters
· EOF = 0
· Error = 0
· Break = 0
· Event = 0
· XON = 0x11
· XOFF = 0x13

Simulating DAQmx measurements?

$
0
0

Hi All,

 

I'm working on a project where I wont have the physical hardware available for a while. But I know exactly what my incoming data is going to look like. I'll be making some current measurements through a NI 9203 and I have a simulated cDAQ setup in MAX with all my modules in it. The simulated device is working fine for debugging and letting my code run through but by default the simulated device only registers a sine wave. Is there a way I can control what the simulated device outputs? Perhaps turn a dial and have it output a corresponding signal between 4-20mA?

 

Any help will be greatly appreciated!

LV FPGA dll call from C++ application

$
0
0

Hi all,

 

I have developed a LV FPGA dll which I call in a C++ application from a command console in windows. During the operation various update messages are posted to the console using std::cout. This all works really well. I now want to pipe all this info to a file and this is where it doesn't work well. The log file is always empty. I've tried a bit of debug and found that the application will pipe to file so long as I don't call the function that creates the FPGA reference, but as soon as I call the create FPGA reference function all piped messages are lost. Anyone got any ideas why this is happening?

Thanks,

Nick


State Machine Stop

$
0
0

Hi

The attached VI does not stop after the VI reads the Stop. It stops after finishing the next loop. Why? I wish to stop the loop right away after the Stop button is pressed or at least after the VI reads the Stop button. How can I do that?

Thank you,

Steve

Using LabVIEW for packet sniffing and IP spoofing

$
0
0

I'm working on testing a product that has two processors that communicate over UDP on Ethernet. Both processors and the tester have unique static IPs on the network. I can stop either processor from sending messages to the other processor. I want to be able to use the tester to send messages that appear to be from processor 1 to processor 2, and vice versa. I would also like to be able to look at the messages the processors are sending to each other even though they don't go to my IP address.

 

I have seen an NI library for WinPcap (http://www.ni.com/example/27660/en/), but the library didn't work with 64 bit LabVIEW. Also, the front page of WinPcap's website implies that it's been deprecated for a while. It looks like I'll have to write labview code that calls .dlls from a packet sniffer, but I'm not sure where to even find one that can also send from IP addresses that aren't my computer's. Is that even possible without extra hardware?

 

Thanks for any help.

Cannot set source file properties when building NIPM package

$
0
0

I am trying to build a .nipkg to distribute an executable to target PCs at my company. I installed the package build specification shown in this link. Now I am able to build packages in LV 2016. However, when I would build a traditional installer I would set my .ini files to have the access property "unlock" so they can be located in program files and still be written to. (This is on the tab right after "source files" called "source file properties" when building an installer). When building a package, I do not see this option, so I cannot write to the .ini files anymore. Is there a way around this, or do I have to find a different location to put the .ini files if I want to proceed with NI packages?

need to make a xy plotter using labview

$
0
0

i have a vi which has an grayscale edge d now detected image  .now i need to extract the co ordinates of the image and plot the same sequentially in a chart . i have dove it using gcode parsing . but i need to do it with the co ordinates. pls help me

 

i am working a project to plot the image on a paper. your ideas please !!!!!!!!!!!!! 

 

i firstly need to plot the image given below in the chart likie it is drawing it..

 

Thank you

case structure and strings?

$
0
0

I am trying to create a case structure with a couple different cases to change units in a problem. I already have the code for the units, but not sure how to use a case structure with strings. I would like to have a drop down menu in the front panel in which you can select the type of unit that you want to use, and thus the case structure would then execute the code within that case to display the proper units. Is there a certain thing I should connect to the selector terminal to do this? I am trying to sort it out now using an array, not sure if that is the correct way to go or if it is how to exactly configuring it correctly. Thanks.

 

ActiveX with UareU FingerPrint 4500 Issue

$
0
0

Hi LabVIEW Community;

 

I'm trying to communicate LabVIEW with Digital Persona 4500. Now i'm using Activex with Property Node and Invoke Node but I have a problem.... 

 

LabVIEW.JPG

 

I dont know if is this a LabVIEW Issue or I have to have a previous configuration of the parameters. 

 

Im reading the guide of the Biometric fingerprint and all should be OK, but always is the same problem 

 

"Object reference not set to an instance of an object. "

Error -2147467261 occurred at an unidentified location
Possible reason(s):
LabVIEW:  (Hex 0x80004003) Invalid pointer.
=========================
NI System Configuration: A required pointer parameter was NULL.

 

I hope you can help me

 

Thanks!

 

 

Is it possible to use native JSON primitive to parse this?

$
0
0

Hey all,

 

So I'm currently using InfluxDB (a time-series database) to store all of my measurement data. I have developed a tool, using LabVIEW, to provide users with access to this data through a nice interface. This tool uses the InfluxDB's Restful API to query data, which responds in JSON format. I have used other toolkits, such as JKI JSON, to tackle the issue I'm having, but these toolkits are MUCH slower that the native LabVIEW "Unflatten JSON String", in my experience. And since I am often posting requests for hundreds of thousands of points, this is no good. So, here is an example of a JSON string response for such a query:

{
	"results": [{
			"statement_id": 0,
			"series": [{
					"name": "ac_phase3",
					"columns": ["time", "value"],
					"values": [["2018-09-19T23:00:12.63546368Z", 0.07106], ["2018-09-19T23:00:12.637463552Z", 0.235248], ["2018-09-19T23:00:12.639463936Z", -0.011033], ["2018-09-19T23:00:12.641463808Z", -0.093127]],
					"partial": true
				}
			],
			"partial": true
		}
	]
}

Take notice of the 2D array "values". Each row contains a timestamp(string) AND a value (DBL). This structure is not possible in LabVIEW, without the use of clusters (which reflects a different JSON structure). Technically, a 2D array of variants would be the most accurate representation, but the VI breaks when I do this (JKI toolkit does not, but again it's really slow). I would like to be able to use this native VI, because it is fast! However, I don't see a way of getting this to work, efficiently... Is there something I can possibly be missing? Would love to hear some other ideas. I know that I can write something up in Python to handle this structure, and pass it into LabVIEW, but I'd like to avoid that, if possible (but will certainly do so, if it comes down to it). Thanks!

 

-Alex W.


Please convert from LV 2017 to 2010

$
0
0

Hello,

Could you please convert these two files from LV 2017 to 2010?

Please convert from LV 2017 to 2010

$
0
0
Moved to Version Conversion board

Re: How to read Serial Data from Arduino using labview VISA?

$
0
0

Dear friends and colleagues!

I have a question for working on Arduino with a LabVIEW program!

As I have used, there are two methods including LabVIEW Interface for Arduino and LINX.

Both of them can be installed from VIPM.

However, I am wondering about the working of collaborating between them. 

For example, with LV Interface for arduino, we have to use Arduino IDE to compile LIFA base to a hex file, then embed it into Arduino as known as firmware or something like that. If this step is success, that mean we can use LabVIEW to program and talk to arduino according to RS232 protocol? 

My questions are:

(1) the process that I shown above is right?

(2) For LINX, everything is running smooth and easier but is it same process with LabVIEW arduino Interface?

Many thanks!

Could waveform X-axis be other than time?

$
0
0

I want to plot a scan waveform, the x-axis is current and y-axis is voltage. The current scan is linear so I just need to know X0 and dX, the voltage is an array of float data. It seems right to build a waveform with t0, dt and Y array, but seems build waveform only accept timestamp as x-axis input. Sure I can use xy graph instead, anyway,I feel un-necessary to save all the x data.

Image Processing

$
0
0

Hi all,

 

I need to make make machine vision application known as pattern matching but before making pattern matching I need to process image in order:

1) Acquire RGB image with webcam

2) Convert to 8-bit Grayscale image 

3) Covert to Binary image (threasholding) 

4) Apply Danielsson function 

5) Watershed and segment image 

6) Lable image

7) Detect geometric contoure of the shapes

8) Learn and train pattern matching 

 

I am new to image processing and I have problem on step 7. I have applied Filters as Gausian and Sobel filter on grayscaled image to smooth the image and extract outer contur of the objects. Threasholded the image and made it better with Grayscale Morphology. Before step 7 I need to represent shapes on an image and overal them with text that says what shape is represented. The tricky part is that the application needs to be scale and rotation invariant on trained patterns. I am not sure what to do between step 6 and 8 and also I am not sure that I am doing things correctly.Can someone help me with this task?

I am working on Labview 2013 with VAS and VDM modules. You can find attached VI-a, Snap Image and screenshot of the front panel below. 

 

ps.

 

You travel through application by clicking the buttons in order because the buttons are connected to event structure.

 

 

 

Viewing all 67219 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>