Quantcast
Channel: All LabVIEW posts
Viewing all 201911 articles
Browse latest View live

Re: Cannot get latch mechanical action on boolean button inside a cluster

$
0
0

 wrote:

@Blokk:

I certainly agree that using several latched buttons (or even one latched button) inside a cluster is not the optimal design choice.

I did not say this. I said it is a bad design not putting the Cluster control into a (single) Event case. There is nothing wrong to use several Boolean buttons (with "Latch until release" mechanical behaviour, as this is the common usage) inside a Cluster, I do this all the time!

 

I disagree that it is always a bad design choice to define events for elements of a cluster. I think defining events for elements of a cluster makes the code more readable.

Well, in my opinion the code is more readable if you use a single Event Case for a cluster, since we have this option. You read out the control in the proper place, and it is also very easy to compare old/new values and get the index of the button which value got changed. I cannot imagine a more simple way to do this right now...


 


Re: Measuring TCP connection speed

$
0
0

The TCP nodes work asynchronously! This means if you call a TCP Write, the function will return before the actual data is really transferred over the wire! TCP Write places the data in a buffer and transfers it to the socket driver and then simply returns while the socket driver will start transferring the data to the network card which at some point might/should place the bytes on the wire. As long as you do not run out of memory you can keep throwing more data at the socket connection with TCP Write and the return from TCP Write has absolutely no connection in time when the data is really transferred over the network.

 

TCP Read is similarly asynchronous but in the opposite way. It will sit there and wait until the timeout expired, the number of required bytes have been received, or the socket reports an error.

Re: How can I combine Analog Input (position LVDT) and Analog Input (load cell) into the same task?

$
0
0

I think your problem is diferent, you have configured a Task named LVDPosition and Load Cell and calling them in the first step of your code

imagen.png,

and then you are then calling the same physical channel as the task you called:
imagen.png

You should use only one of them or the first part of the code, or the second one. I would recomend to use the second one as you did with the digital signals.

 

Greetings!!!

Re: Measuring TCP connection speed

$
0
0

Hi Rolf, 

 

Actually I couldn't understand what you meant but please forgive me if I'm too away from your reply. 

 

Of course if there is nothing to read in TCP Read side, TCP Write VI throws an error because packages have no place to go. After I run TCP Read.vi, I'm running the other VI to send 1024 bytes. TCP Read.vi polls packages and stops, it's a one time thing, no loop's needed. I've read a lot of stuff for .NET but I couldn't find enough for LabVIEW. I don't know if it is possible but where do you think I'm doing wrong?

 

BTY, here is an example for reading performance counters through .NET API:  http://www.ni.com/example/30405/en/ 

 

Thanks,

Inverse kinematic of adjusted Scara robot

$
0
0

Hi LabVIEW users, 

 

Actually i am having problem to how to use the inverse kinematic module in LabVIEW, 

I have tried to adjust an example which i have found in LabVIEW library but i couldn't make the needed amended. 

Now I am thinking about building a new code from A to Z but again  i feel like i lack several information. 

 

Please check the attachment below for the example i am talking about. 

Looking forward for your kindly help.

Appreciate. 

Thanks. 

 

Re: Resta de dos array de elementos iguales

Re: Measuring TCP connection speed

$
0
0

The problem is that trying to time the execution of the TCP Read nor the TCP Write nodes will give you any meaningful timing values that you could use to calculate transfer data speed, especially if you do it only once, and not continuously in a loop.

 

Lets look at what happens when you issue a TCP Write: (timing is just a very rough and somewhat exaggerated indication to show the problem you will see)

 

0 us: TCP Write start

0.5 us: calling some internal functions to translate the TCP IP refnum to a Windows socket

1 us: calling the Windows socket function write() with the pointer to the data buffer

2 us: write() allocates a socket buffer and copies the data into it

8 us: write() signals to the Windows socket handler that the socket has a new buffer that needs to be transmitted over the network.

9 us: The Windows socket handler checks the status of the network card and if it is valid it starts transferring the first chunk of memory into the network card buffer, signalling to write() that everything is fine.

9.5 us: The network card places the first byte of the data on the wire

10 us: write() returns with success as it buffered the entire data internally in the socket and the socket handler indicated to it that it is going to handle the data as there is a valid connection

11 us: TCP Write returns happily to your diagram indicating success

50 us: The Windows socket handler finishes transferring the last chunk of data to the network card, signalling internally in the socket that the connection is still valid, and all data has been transmitted.

55us: the last byte in the network card has been sent out over the wire

 

So while your timing will indicate that the TCP Write took about 11 us, the data transfer period in the network card was really about 45 us, and incidentally has almost no overlap at all with what your TCP Write timing measured.

 

This is what I mean with asynchronous operation. The execution time of TCP Write is more or less completely independent from the execution time of the real data transfer on the network wire. As such it will be way of from what you can see in the task manager as the task manager shows internal network performance counters that are updated in the low level network card driver and indicate more accurately what is really happening on the wire.

 

You can get a timing that matches the Windows network measurements more accurately by writing lots and lots of data to the network in a loop and measure the average data transfer speed but even that is only so much accurate. What you measure on the application level is the TCP/IP payload, what the network layer measures is the actual IP data frames lengths that is transferred. Your TCP/IP frame has an additional TCP and an IP frame header in front of your payload data, so the network always transfers more data than what you send and receive on the application level.

 

Reading has a similar but in fact opposite issue. TCP Read will generally wait some time before data happens to arrive and will return when the requested data has arrived (or an error has occurred) NOT when the sent data has fully arrived, which could be a lot more.

 

So while your timing on the TCP Write mainly measures the execution time of copying the memory buffer into the socket itself rather than the transfer time over the network, timing the TCP Read will mainly measure the time of the function to wait for data to arrive, and to copy that data out of the socket into your LabVIEW string buffer. There is no real correlation with the network transfer at all here.

 

Once you start to do this in a loop that can saturate the network link (or the LabVIEW data handling in either TCP Write or Read) you get closer to a meaningful value but still nothing you can easily compare with what the Task Manager reports for your network interface.

Re: Reload data from config.ini

$
0
0

Tienes que crear un ciclo paralelo que constantemente lea el archivo *.ini (como texto no como config file) y con un shift register guardas la lectura, comparas los dos strings (el actual y el que viene del shift register) con una funcion equal? o not equal? (la que mejor te funcione) y  si no son iguales que te dispare una bandera a tu ciclo principal para que regrese al estado en el que lee el archivo *.ini como config file y actualiza tus variables.

 

Saludos.


Re: GUI sizing problem after windows (10) display timeout

$
0
0

Try modifing the compatibility properties in Windows 10 of your builded application

Rigth click over your *.exe -> Properties -> Compatibility tab -> Configuration section

 

Greetings!!!

Re: How can I combine Analog Input (position LVDT) and Analog Input (load cell) into the same task?

$
0
0

Hi Roger Garcia,

 

Thanks for your analysis. Actually, It has no error if I build a VI with only the upper code (LVDT) or only the lower part code (LoadCell). However, if I put both of these two signals in parallel into one VI as the picture shows, Error-50103 will appear. My question is how can I eliminate this kind of error? Is it possible to combine these two signals into one NI-DAQmx Create Virtual Channel?

 

Thanks again,

Jason

Re: How can I combine Analog Input (position LVDT) and Analog Input (load cell) into the same task?

$
0
0

Hi Roger Garcia,

 

Thanks for your analysis. Actually, It has no error if I build a VI with only the upper code (LVDT) or only the lower part code (LoadCell). However, if I put both of these two signals in parallel into one VI as the picture shows, Error-50103 will appear. My question is how can I eliminate this kind of error? Is it possible to combine these two signals into one NI-DAQmx Create Virtual Channel?

 

Thanks again,

Jason

Re: How can I combine Analog Input (position LVDT) and Analog Input (load cell) into the same task?

$
0
0

 wrote:

Is it possible to combine these two signals into one NI-DAQmx Create Virtual Channel?


Actually, you need 2 calls to the Create Virtual Channel chained together.  There is a task input to have the channel added to the task.

Need help with serial communication

$
0
0

Hi everyone,

I'm trying to talk to a device using VISA serial but I have difficulty getting it to work. I've done this before with a different device and I'm following the same steps for this new device with no luck so far. 

 

Here are the steps I tried:

1) Before I configured the port, the device manager was able to see the port. Also, I was able to control the device using the provided software for the device.1.jpg

 

2) I used NI-VISA Driver Wizard to configure the port. The software automatically filled in the options and I made no change to them.

2.PNG

3) After installing the .inf file, the port appeared in the device manager as this:3.PNG

 4) NI MAX also recognized the port 4.PNG

 

 

5) The communication settings in MAX I/O5.PNG

 

6.PNG

 

7.PNG

 

 

 

There was no error when I sent in a command, but when I tried to read the buffer, I kept getting timeout error. The device uses checksum as the terminating character which I'm still trying to understand. However, according to the manual, I should be getting a message back regardless of what I send in. I think MAX isn't not communicating with the device at all.

 

Please help!

 

Thank you

 

 

ELVISmx Instrument Launcher immediate crash

$
0
0

Hello,

 

I have a freshly installed Win7 x64 PC. I installed the following NI software step by step, always restarting the PC between:

  1. LabVIEW 2018 32bit
  2. NI Instr. Drivers package (DCD-May18)
  3. ELVISmx (NIELVIS1800)

If I try to start the "NI ELVISmx Instrument Launcher", it just crashes, with these msgs:

crash1.pngcrash2.png

I did a repair install for LV2018, then for ELVISmx, did not help. ELVISmx features work however from LV launching them as Express VIs...

I am not in the mood for a Win reinstall, is there any other thing to try to make the Instrument Launcher function directly from desktop? This is not a must one, but quite annoying after installing the most up-to-date NI software packages...

Thanks!

Re: LVM to Waveform


Re: Data acquisition with NI 9224 and NI 9203 in one while loop

$
0
0

                 Thank you for your reply first,but when I wire the error out indicator ,there are no errors appearing.And when I put the NI 9203 in another while loop in the same vi, the numerical display control can show the data.I really don't know what happened!

                 best wishes!

Expecting your reply!

Re: error 1073807246 cRRIO 9074 migrated to cRIO 9030

$
0
0

the cRIO 9704 chassis has 1 serial port. cRIO 9030 chassis has 2 serial port. This means I have to ass 1 to all my addresses. I.e. ASRL 4 is now ASRL 5. Then it works

Re: Data acquisition with NI 9224 and NI 9203 in one while loop

$
0
0

I meant to do something like this:

Sin título.png

And delete the current indicators and create them again from Right click->Create->Indicator because you have a coercion dot in those Indicators, maybe because you copied them from the first Indicators you created.

 

I hope this helps.

Re: Creating a pressure drop shut down function

Re: Cannot get latch mechanical action on boolean button inside a cluster

$
0
0

How silly.  If you have a Cluster whose elements are all Latch until Released Booleans and you do (as GerdW and I both suggest) put the entire Cluster inside its own Value Changed (for the entire Cluster) Event,  Since you can Mouse Down on only one button at a time, any Button Click will "turn on" exactly one button, and it should be pretty trivial exercise to figure out which one.  You can do a single Cluster Element, or the entire Cluster in an Event, but be sure that the entire Cluster is in each Event that involves it.

 

Don't they drill this idea into discussions of Boolean Latches and Event Structures any more?

 

Bob Schor

Viewing all 201911 articles
Browse latest View live


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