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

Re: CANopen on PC with USB to D-Sub

$
0
0

I didn't really want to go into the ins and outs of the project as its not really related to the question at hand but basically there aretwo of us working on the project and we do have a compact RIO and a CANopen module but my colleague is using it to develop the actual system. I am developing a small scale mockup of the system as a proof of concept and so the budget is not going to be huge for my part, not enough to justify purchasing two of everything including a cRIO.

 

I have a cDAQ that I use for prototyping and the motor control works fine on the cDAQ so no need for a cRIO, but the issue is the CANopen module wont work on a cDAQ. So I need another method of reading in the sensor data for the closed loop control of the motor that doesn't involve buying a second cRIO chassis. I was thinking a USB - CAN interface or a microcontroller that can read in the CANopen data and transmit it in some easy to read format to the cDAQ.

 

Selling it or changing the protocol is not an option because this is the protocol that is used on the main system and there is other hardware that also operates on CAN and they are networked together. All this was planned during system design phase, its not something where I can just sell it and get a different piece of hardware unfortunately.

 

I did tell you guys that these weren't options and it would have been easier if you just took my word for it rather than I have to explain all the inner political workings of the project.

 

In terms of why I am posting here, I was looking for advice on the best way to get the CANopen data into LabVIEW on a small budget of a few hundred pounds. My company doesn't mind buying me the USB-CAN interface and I am happy to download some code for the CANopen but I dont know how to do that, hence me posting here for some advice and help.

 

If it is definitely possible to use a USB-CAN interface then I can go ahead and order it, but I didn't want to order it and then come back to the PM in a few weeks and say "actually we cant use this". I also wanted some advice on choosing the right USB-CAN interface as I was worried about selecting the wrong one and it not working with my hardware. I also am not sure how to get the data into LabVIEW even if I ordered the USB-CAN interface so was just looking for some advice on that so I know what is actually involved with it.

 

p.s. sorry for the 4 posts above, they weren't showing up yesterday when I was posting them so I kept retrying and they all appeared at once today for some reason.


FPGA: Butterworth Filter Express with no output

$
0
0

Hello,

 

I'm trying to use a Butterworth filter express in my FPGA (7852R), but I'm apparently getting no output. I suspect it has something to do with data types (fixed point vs I16), but I believe I have tried all the possible combinations, so I must be doing something wrong.

 

The idea is to implement a very simple derivative and then apply a low pass filter (order 2 or 4) to get rid of the high frequency components. The code works well without the filter, but when I try to insert it between the red and blue dots, I don't get anything. How should I wire it, and what should I consider?

 

butterworth.png

[VersionNumber] doesn't work for RT?!

$
0
0

Hi,

 

I use the [VersionNumber] tag when I build my host applications both in the exe name and in the folder name. This helps tremendously to maintain different versions of the same application and also to immediately understand which version is stored where.

 

It is surprising but it seems the same tag doesnt work when I want to build an RT application:

The [VersionNumber] tag in the "target filename" filed creates a file eg: "LEC_RT_V[VersionNumber].rtexe" instead of "LEC_RT_V1.2.3.4.rtexe"

The same tag in the folder name drops an error message (copied below). It is very clearly caused by the tag as if I dont use it my app builds just fine. The app builder DOES create the right folder name so in this case "LEC_RT_V1.2.3.4" but it fails to build the actual rtexe file. (the folder structure is completely empty)

 

Is there any workaround? It is very inconvenient and error prone to manually rename the folder and the files. Plus its very conterintuitive that I can track the version in the app build, even can set it to auto-increment, but I need to manually change file names.

 

thanks.

 

"Click the link below to visit the Application Builder support page. Use the following information as a reference:

Error 7 occurred at Open/Create/Replace File in RTBEP_Generate_Deploy_Instructions2.vi->AB_RTEXE.lvclass:Build.vi->AB_Build.lvclass:Build_from_Wizard.vi->AB_UI_Frmwk_Build.lvclass:Build.vi->AB_UI_FRAMEWORK.vi->AB_Item_OnDoProperties.vi->AB_Item_OnDoProperties.vi.ProxyCaller

Possible reason(s):

LabVIEW: File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.
=========================
NI-488: Nonexistent GPIB interface.

c:\BUILDS\RT\LEC_RT_V[VersionNumber]\depinstr.bin"

 

RT_BUILDER.gif

Re: Data Older Than and Younger than.

$
0
0

Or else I will give you the whole project. The project is send files over tcp/connection to backup the files in a network hard drive. So I have created a program that has a client server system where as u know the server will send the files using tcpip connection and the client will accept the files and store it in the network hard drive. I have four conditions. The conditions are copy all data, copy data older than a date or younger than a given date (which Iam attempting to do now) and later on defined data, which is u will be able to select which folder you want to copy. I have done the first condition that is all data. As u can see from my attached program a single path is going out of the all data event. Now I have to create 2 more events data younger than and data older than where the output of that will be connected to that single path going out of the even structure. Iam trying to combine the two programs. That is insead of the copy file, I will be having rest of the program from the main proram which is client and server together solved.  So that is what Iam trying to achieve. Please help me. Thanking You.

 

Vindsan

Re: XNET Read (CAN Frame Input Queued)

$
0
0

Hi Ali, 

 

From what you've mentioned it seems its a fairly similar issue to the forum linked below. Attached in the reply there is an example VI to show you a little more how the buffers can be used in XNET which may be worth having a look through.  You can set the buffer size and look at the unused spaces in both the read and write queue.

 

XNET CAN frame queue overrun kills Read VI: http://forums.ni.com/t5/Automotive-and-Embedded-Networks/XNET-CAN-frame-queue-overrun-kills-Read-VI/m-p/1066079

 

It might be helpful to have some example code for this to look further into the issue, but let me know how you get on! 

Re: CANopen on PC with USB to D-Sub

$
0
0
Why don't you ask NI if you can get a loaner of their USB-CAN device? If you search for it, you'll also find code that implements some of the CANopen protocol with it. You keep insisting that your only option is cRIO and I don't understand why.

https://decibel.ni.com/content/docs/DOC-4440

Re: CANopen on PC with USB to D-Sub

$
0
0

Update: I have found a USB-to-CAN interface that comes with some LabVIEW code for CANopen so I will get a quote and see if this is within the price range:

 

The hardware:

 

http://www.ixxat.com/products/products-industrial/pc-interfaces/pc-can-interfaces/details-pc-can-interfaces/usb-to-can-v2

 

 

The sample LabVIEW code:

 

http://www.ixxat.com/support/file-and-documents-download/drivers/vci-samples-tools

 

If it turns out to be too expensive then I will look at whether the code can still be used with a cheaper USB-CAN interface or if there is another method.

 

Just in case anyone else has this problem in futurue, thought I would share what I find

compatible chips for hardware implementation

$
0
0

which chip should be used to dump labview program ?

and how to do it? 


Re: What is the best way to save the operating hour of a device?

$
0
0

Yes I am activating and deactivating it from my application, that I implemented in LabVIEW . I am saving lots of values from device in Shared Variables, therefore I want to save also the operating hour in a shared variable and I want to show the operating hour on GUI as hour:minute, it shall be shown to user but not changable by user. Later on I will backup the shared variable database to analyze it. I want to avoid to save it in a text document.

And I don't want to accumulate all of the run times during start-up the program. After a couple of years, maybe the data will be huge and it will take a long time to accumulate all of them.

Re: VI documentation

Re: CANopen on PC with USB to D-Sub

$
0
0

Dennis that looks perfect. The NI USB-CAN interface is considerably cheaper and that library for CANopen should work perfectly. 

 

Is there any compatability issues that I might get between the sensor and the hardware/library or are al CAN and CANopen interfaces pretty much the same?

 

I will hopefully look at getting the following NI USB-CAN interface. 

 

Thanks for that, looks like the perfect solution. Never used libraries of LLB manager before so guess I will need to start looking at that.

 

I will give it a go and if it works I will mark that as the solution.

Re: CANopen on PC with USB to D-Sub

$
0
0

Do you know what level of CANopen you need?

 

If you only need to look for some TPDO and do a little NMT to get the sensor up and running, then you should be able to implement that in LabVIEW.
Of course you need to know a little about CAN and CANopen messages, that you need to do anyway. 

And for that you could just use a NI USB CAN module. (That is what I'm doing)

 

And CANopen is "just" a protocol on a CAN network.

Any module that can read a CAN bus can handle CANopen or any other CAN protocol.

Modbus RTU. Error 6101 occurs by reading from PID controller

$
0
0

Hi there 

 

I'm having trouble reading the temperature from a UR3274 PID controller. I have tried all suggested solutions I found online related to this problem but nothing helped. A similar VI for setting the temperature works fine and I have also checked the modbus communication using "simply modbus master 7.1.2" which gives correct values for a read request. 

 

 

I have attached a screenshot of the Block Diagram and both, the functioning "set temperature" VI and the malfunctioning "read temperature" VI.

 

I`m relatively new to Labview and would greatly appreciate any help. 

 

Regards 

Lukas

 

 

Labview 2012 SP1

Windows 7

 

 

Re: When are DVRs automatically deleted?

$
0
0

mthimm1 wrote:
... it is difficult to understand for me, why the DVRs die with the Vi that created them.

Not the VI. The hierarchy (which is defined by a top level VI). That's an important distinction, because it means references do generally stay alive correctly. Like I said, there are other alternatives, but this is the mechanism LV has had for a very long time, and in most cases, it works fine. Where it breaks down is in the case where you run VIs dynamically (making them top level VIs) and obtain references there and those VIs stop before other VIs which use those references.

 

The easiest solution is generally to create the reference in a hierarchy which will stay around as long as that reference is used and usually there is no need to run a special VI just for that. In your case, it's unclear from your description whether the DVR belongs to an instance or to the class (like static variables in C++), but I assume you want it per instance. Often, the more readable option is not to put the DVR in the object, but to make a DVR of the object itself and use that to identify different instances of the class. This is a useful way of making by-ref objects in LV. In either case, you would want the code where the DVR is created to be in a hierarchy which keeps running (most likely the main VI).

Re: CANopen on PC with USB to D-Sub

$
0
0

I did wonder why I would need any extra hardware for CANopen besides any CANbus hardware.

 

But NI have a designated CANopen module for the cRIO so I am not sure how that physically differs from their CAN module. I assumed there was something being implemented in hardware or there was a certain type of CAN used for CANopen (I know there is fast and slow CAN and I think some other characteristics that can vary as well).

 

I think the USB-CAN intreface is really cheap so unless there is a module that costs less then it should be ok I think. I wonder why they have a CANopen specific module if all of the CANopen elements are implemented in software. The other issue is whether any of the CAN modules would be compatable with a cDAQ.

 

I am not sure regarding the level of CANopen, I don't actually know what TPDO and NMT is so I guess I will have to do some reading. I don't fully understand what data I will be pulling out of the sensor or if there is a specific subsection of the CANopen data I need. I knew absolutely nothing about CAN until a few days ago so its all very new to me but I will try wrap my head around it. I am slowly getting there Smiley Very Happy


Re: compatible chips for hardware implementation

$
0
0

Hi aishu,

 

why do you want to put some LabVIEW programs into the dumpster?

And why do you need a chip to do so?

 

LabVIEW can create executables for several targets (Windows pc, MacOS, Linux, NI RT targets, NI-FPGA targets, …) and it brings it's own "dump" routines to do so…

Re: convert time stamp in chart for other kind of Calendar like solar calendar

$
0
0

I remembered a couple of other options, but looking at the thread again, my understanding is that you're probably using the Persian calendar, not the Hijri one, but that just means you need to select the relevant class.

 

The other options are:

 

  1. Calculate the correct date, then convert it to a timestamp in the Gregorian calender where the year only shows two digits (for instance, if your date is 15/06/1387, convert it to 15/06/2087), but one likely issue with this is that the months will probably not always have the same number of days.
  2. Place an array of strings over or near the graph (you can make them transparent) and set the value in them. The big problem with this is that it will be difficult to set correctly when the user scrolls around or changes the zoom.

Matched filter

$
0
0

How to perform matched filtering in spectrum sensing?

Rif.: Modbus RTU. Error 6101 occurs by reading from PID controller

$
0
0

Hello stiefel92,

 

try to delete the flat sequences from your code, they are useless here. 

This error is a timeout error which can be generated by timing of the application, and flat sequences may be one of the possible reason.

Let me know if this solve your problem.

 

Kind regards. 

Matched filter

$
0
0

how to connect band pass filter with the matched filter block?

Viewing all 201911 articles
Browse latest View live


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