Send CAN remote frames periodic on RTSI pulse

Hi. I'm trying to send a remote frame (with the RTR bit set) on receipt of a RTSI pulse from a PXI 6602 timer card. I then need to receive CAN data frames at the CAN card from the instruments with the arbitration ID of the remote frame sent.
I can do this using CAN object transmits period using RTSI example vi and Cont pulse train vi to provide the RTSI pulse. However this can only send CAN data frames, not remote frames. Grateful for any help on this.
VIV

Hi VIV
Instead of using a CAN Object you can use a Network Interface Object for that. There is already an example that just needs minimal modification.
If you are using LabVIEW:
Open the NI ExampleFinder and navigate to the Network Interface transmits CAN frame on RTSI example (Hardware Input and Output » CAN » Frame API » Synchronizing CAN with DAQ » DAQ Card Controls RTSI » Network Interface Objects). Modify the example by wiring a '1' (numeric value) to the currently open 'IsRemote' terminal of the ncWriteNet.vi.
If you are using C:
Navigate to the …\National Instruments\NI-CAN\MS Visual C\Frame API examples folder and open the Network Interface transmits CAN frame on RTSI example. Locate the line
Transmit.IsRemote=NC_FALSE;
And change it to
Transmit.IsRemote=1;
Now, you’re transmitting a remote frame with every RTSI pulse.
-B2k

Similar Messages

  • NI XNET Remote Frame request in Labwindows

    Hello,
    Can someone plz share me the sample code to do the following
    1.INPUT SESSION :set the XNET interface to send a remote frame and read the data frame recieved.
    2. OUTPUT SESSION : XNET interface sending the data when it recieves a remote frame.

    You might want to start a new thread and link to this one.
    Since this one was already marked as solved, a lot of people won't come back to read it.
    If you're able, I would suggest posting your VI.
    I would guess that something in your "big sequence loop" is the more likely culprit for your CAN transmission delay.
    SandyGao wrote:
    Hi,
    I am really happy that I can read this article because it seems like it is the similar problem that I am facing right now. I also has a really bad CAN update delay when I want to write Data on CAN bus.  I was trying to following your solusion here, use frame in single point, frame out single point. But I am not so sure that I can continue. In our labview, we use frame in/out stream(sorry the screenshot cut is wrong). But if I want to change it to frame in/out single point, it will show an error saying: mising wiring on NI-XNET block.
    In our labview, we use a big sequence loop. So what in saw in the 1st pic I attached is the first sequence, then in the 2nd sequence we had a Frame Can write frame. Then in the 3rd one, which is in the 2nd pic, it shows the CAN write frame that contain a lot of message that I would like to write on CAN bus.
    The problem here is sometimes the CAN loop takes 0.3s(I use a shift register in the 3rd sequence showing CAN loop time) to update which is too low for me to use Vector Canalyzer to record data. 
    In your article it said I need to 'Frame in single point' for my reads, and 'Frame out single point' for my writes. I do not know where I can do this. Also how to make it cycling timing. And I did not have any database in NI-XNET database editor. Do I need to build it there?
    Thank you so much. 

  • RTSI pulse using a CAN frame

    Hi,
    I'm currently using the ncWriteMult function (we can't use the ncWrite
    function because our application simulates problems of transmission on
    the CAN i.e. stopping an exact amount a frames or sending frames with
    the wrong DLC => we need a good accuracy so we can't use for example
    ncAction(NC_OP_ START / NC_OP_ STOP) to stop N frames and then restart
    => our application fills a buffer with timestamped frames and send
    them with ncWriteMult).
    The application has to synchronize those actions with DAQ so we want to
    use RTSI. We want, for example, stop 50 0x203ID-frames, restart them
    and 100ms after send a RTSI pulse for DAQ synchronisation (to toggle an
    analog signal, that DAQ part works).
    As the application fills the buffer passed to ncWriteMult with
    timestamped frames, we 'd like to put special virtual CAN timestamped
    frame in that buffer that would only output a RTSI pulse.
    Is it possible to do that ? I tried to use the the NC_FRMTYPE_RTSI but
    this type seems to be only used to store RTSI events received by the
    CAN card in the read queue doesn't it ?
    Thanks for your replies.
    Best Regards.

    Hi JCX
    Well if i understand your request, you need to output a RTSI Pulse 100 ms after you sent 50 Frames using the Write mult net function?
    The easiest way to do so, would be using the Confog Net with RTSI to configure the RTSI output on call of nc action. Thus you will have a single RTSI Pulse on every call of nc action and you can configure this output 100 ms after your write mult  has written the last frame, controlled by using a wait for write success.
    See the attached example, for details.
    I noticed one problem with this solution: The open Function  initializes a start trigger pulse on the specified RTSI Line, thus you will see one RTSI Pulse on call of ncopen, before you enter the While loop to call the write mult. We are working on this to fix it for the next driver.
    DirkW
    Attachments:
    CAN Transmit multiple_Output_RTSI.vi ‏104 KB

  • CAN Transmitt frame on RTSI.

    Hi all!
    I have a problem, I want to send CAN frames when I receive an RTSI pulse. To do that i configured my CAN Network Interface, and i generated a pulse train. At the begining, i configured the delay between two pulse at 700µs. It seems to work, but i noticed that sometimes after a day or after a week, i get the warning 1073094950 : NI-CAN:  (Hex 0x3FF62126) You configured CAN transmit when a RTSI input pulses, and the RTSI rate occurs faster than CAN frames can be transmitted at the specified baud rate. Solution: Configure the source of RTSI pulse (i.e. DAQ counter) for a slower rate.
    I read in the data sheet : When you configure a DAQ card to pulse the RTSI signal
    periodically, do not exceed 1000 Hertz (pulse every millisecond). If the RTSI
    input is pulsed faster than 1kHz on a consistent basis, CAN performance will be
    adversely affected (for example, lost data frames).
    After that i configured the delay between to pulses to 1ms and tryed again.... with the same result... sometimes i don't know why i receieved this damned warning !!! I also tryed with 1,6 ms ... (the maximum i can have between two pulses).
    I don't know why i have these limitation from this card ! I know a solution will be to use FPGA instead on these poor CAN cards but i don't have the time to rewrite the code with FPGA (i meet the customer next week). So i just want to know if someone else meet this problem (and eventually has a solution) or can explain this strange phenomena ....
    Thanks.... for all your futures answers!

    Hi dirk!
    The port used to send the frame on RTSI pulse is only used for this .... in fact i only used one port of my 2 ports CAN board (as you suggest in your last message). Moreover, i put the comparator and mask to CFFFFFFF (to ignore incoming frames). So there is no other activity on this port !
    I already use Network interface this can not be improved.
    The pulse train used for the RTSI signal is generated by a NI board, and i checked the signal with a scope, it seems to be ok ... 
    The problem is in my application i can not decrease the frequency of the RTSI pulse ... otherwise i will not be compliant with the customer specification. My last idea to resolve the problem is to use two different ports (of two differents boards) to send the frames. I will send a RTSI pulse on each port every 2 ms... i will try and i hope it will work ...
    But  again if you have other ideas ....
    Thanks !

  • How to handle text of iframe to send to remote printer in client side?

    Hello everybody,
    I am having problem to handle the printing text of iframe to send to remote printer. I am using JDK 1.5, JSP and JBOSS. My clients have to print the information displayed in iframe to their remote Printer. I am using javascript code below to print:
    /* CODE IS IN JAVASCRIPT */
         document.frames[frameName].focus();
         document.frames[frameName].print(); But the main problem is that it takes a lot of times about 2 mins. Why is the above code taking so long time? Is it due to javascript code or the printing process? Is there any method or function to send printing text of iframe to printer faster?
    can anyone help me to solve this problem.....
    Thank You.
    Edited by: ritesh163 on Aug 20, 2008 2:45 PM

    ritesh163 wrote:
    Hello stevejluke,
    I am seeking for the suggestion whether it can be done through javascript or there is any other function or method in JSP that can replay javascript code and also work faster.
    Thank you.But JSP has nothing to do with it. JSP lives on the server, not the client. If can't control the client printer, can't know about it, and can't print to it. This is purely client-side, which means not JSP.

  • CAN Object Transmits Waveform on RTSI

    I have a question to the above mentioned VI. The ncWriteObj.vi is placed in a For loop here. Does this mean that the For loop is executed once every time an RTSI event occurs???

    Hi SVJ,
    the For loop in the mentioned example is executed 8 times before the CAN object is started. Since there is a 8 element queue configured in the ncConfigCANObjRTSI.vi these 8 CAN frames are transmitted after starting the communication using ncAction. After 8 RTSI pulses when the queue is empty the object repeats the last frame until new frames are written into the queue using ncWriteObj (within the while loop).
    If you encounter queue overflow problems please refer to the following knowledgebase:
    http://digital.ni.com/public.nsf/allkb/862567530005F0A186256A3F005FAB83?OpenDocument
    or the "NI CAN Hard- and Software manual" p. 10-150 ncWriteObj.
    Message Edited by AndreasS on 11-10-2008 08:57 AM
    Andreas S
    Systems Engineer

  • The NI 1427, NI 1429, NI 1433, and NI 1435 can generate a maximum of 3 pulses.

    Hi all,
    I'm running a cameral link frame grabber card PCIe-1433, with an I/O extension board.
    LabVIEW 2013, Vision Development Module 2013, Windows 7
    In LabVIEW, I'm using 'IMAQ Generate Pulse3 VI ' to generate pulses.
    In the current iteration I'm generating up to 3 pulses, and the client would like more.
    According to the help file, "The NI 1427, NI 1429, NI 1433, and NI 1435 can generate a maximum of 3 pulses".
    Is there another way to generate TTL pulses on the I/O extension board lines, that doesn't have this limitation?
    Thanks,
    Jeff

    Hi,
    Thank you for the thoughts.
    We are collecting video (280 fps) of a test subject, with the PCIe-1433 frame grabber card and a Point Grey camera.
    At random time intervals we provide a random stimulus to the subject, maybe light, maybe sound, maybe air motion.
    Each of these stimuli is attached to a separe TTL output pin on the I/O extension board.
    The critical measurement is the elapsed time from the stimulus firing until the subject reacts to that stimulus.
    As it is currently set up, I can provide a stimulus (perhaps 0.1 seconds in duration) three times.
    The stimulus is a simple, single pulse, square wave.  That is, turn on this pin, for this duration, and then turn off.
    When I get to the fourth stimulus, the VI fails due to the 3 pulse limitation.
    I can live with that limitation, as the timing of the stimuli and the duration of the video seem to be okay with the limit of 3.
    Now I want to modify the routine, so that I'm using a user adjusted PWM signal from the I/O extension board to adjust the brightness of the flash of light.
    If I use the 'IMAQ Generate Pulse3 VI' to generate the PWM pulse train, then I lose one of my triggered stimuli.
    Since I have 3 different lights to control, that would use up all 3 pulses, and I wouldn't have any pulses left for stimuli.
    It is critical, however, that I record when the stimulus actually fired, so I can time the test subjects reaction.
    Can I get this tight coupling/timing if I use a second DAQ card instead of the I/O etension card?
    Thanks,
    Jeff

  • How to attach transmissi​on of two CAN cyclic frames?

    Hi all,
    I work with:
    Hardware: NI-PCI 8512, CAN interface.
    Software Environment: C++
    OS: Windows7
    I try to transmit two separate cyclic frames, with gap of up to 125 usec between one other.
    I try the approach of sending the nxStart command line after line - and i got a gap of 600 usec. Not good enough...
    Any ideas?
    Thanks for advance,
    Aviad

    Just to clarify..
    You want to send Cyclic Frame (ID = 1) every 100ms
    "Immediately" after sending the ID = 1 frame, you want to send ID=2 frame
    In theory, I think you could do this. NI-XNET should send the frames in priority order if there is a "collision", meaning that the two frames are attempted to transmit at the same time.
    You could try:
    Create Cyclic Frame ID = 0x1, set Cyclic rate to 100ms
    Create Cyclic Frame ID = 0x2, set Cyclic rate to 100ms
    Create Signal for Cyclic Frame 2
    Create session to Id = 0x1 (FrameOutSinglePoint)
    Set nxPropSessionSub_CANStartTimeOff for the session to some number (>= 1)
    Create session to Id = 0x2 (SignalOutSinglePoint)
    Set nxPropSessionSub_CANStartTimeOff for the session to the same number
    Start session 1 (use session only)
    Start session 2 (normal)
    I think this should work to accomplish what you want.. however...
    You cannot really have any guarantees on the CAN bus due to collisions (if your IDs are exactly 1 and 2 you are pretty safe since those are two of the highest priority frames, but in the normal world those are not typically the two frames that are generated). I think it would be better to do everything the same as above, but set the Set nxPropSessionSub_CANStartTimeOff for the second session to be N+1 (N is the number for the first session). The second frame should transmit 500us after the first one in this case. The advantage of this is that you are not relying on any detected collision in the driver (there is an ever so slight chance that they could be sent in the opposite order). You would see 500us instead of 125us (although you wouldn't actually see 125us in the first situation as the two frames would be sent back-to-back every 100ms).
    Is the 125us required? Do you know the data to transmit ahead of time? You could use stream output in replay mode to get precise timing, but that somewhat requries you to know exactly what you want to send ahead of time.

  • I have Adobe Reader X loaded on my computer.  Adobe sends me automatic updates periodically.  I have been told that some hackers have been sending what appears to be an Adobe update and when I select run it will load malicious software or spyware onto my

    I have Adobe Reader X loaded on my computer. Adobe sends me automatic updates periodically. I have been told that some hackers have been sending what appears to be an Adobe update and when I select run it will load malicious software or spyware onto my computer. How would I recognize this attempt and how can I prevent it? I also have Norton protection loaded on my computer (via Comcast). I am not sure if Norton can protect me if I select run. Do you have any suggestions?

    Hi peterc,
    By default, Reader updates occur automatically via the Reader app itself, and this is the most secure way to receive updates. While you can choose to update manually (by choosing Help > Check for Updates), you may not always get critical updates as they're released. See Automatic updates | Acrobat, Reader. If you receive an email about needing to update Reader, you should ignore it, as that is where the malicious updates can come from. Just make sure you're letting the updates happen from within Reader, either automatically or manually.
    Best,
    Sara

  • Measuring period of a pulse

    Hi
    I m measuring period of a pulse coming from a magnetic proximity sensor. There r two porblems.
    1. I want to monitor the data coninuosly in a while loop but the moment it waits for pulse it doesn't stop and hangs for some time....
    2. While monitoring the data , sometimes high values appear ....... but these values are unwanted. Once if i want to filter out thse values and see only the exact pattern , how to make it...
    PLz. do answer these queries at earliest......
    Thanks and regards
    GNS

    Hi,
    To monitor data continuously without hanging:
    1. Configure your counter to do "buffered period measurement"
    2. In your loop, query the counter for "available points" using "Counter Get Attribute.vi"
    3. When == 0, do nothing. When > 0, read that # of points from the counter buffer. This way, you're never asking for any data that isn't already there and your loop won't ever have to hang and wait for it.
    4. Accumulate/store/graph your data according to the needs of your app.
    To filter out unwanted high values:
    First, I'm assuming that your "high values" are high frequencies, thus small periods. If so, these may be caused by sensor and/or electrical noise. The best thing to do first is try to reduce/eliminate the noise at its source. Failing that, there *may* be a way to make good estimates of the correct data, but it could get pretty tricky. Here's an outline of a way to think about and deal with the simplest case -- where you know the expected measured frequency and it's very nearly constant over time.
    The characteristic of such a noise glitch would be a a pair of transitions in rapid succession, either low-->high followed by high-->low or vice versa. Either way, you'll pick up one of those transitions in your buffered period measurement. The trouble is that it may happen anywhere within the nominal period, possibly more than once.
    Let's first look at a case where the nominal period is 1 msec +/- 20% and there is one glitch of duration 0.1 microsecond, occurring at the 70% point of the real period. The measurement should show one period of duration 1.0 msec, but the noise glitch will cause you to receive instead two periods of duration 0.7, and 0.3 msec.
    The simplest correction would be to simply trash all measurements outside the acceptable range of [0.8, 1.2] msec, including these two. Note however that a noise glitch occurring at the 90% point would lead you to trash the 0.1 msec measurement, but believe and keep the 0.9 msec measurement. Note also that if noise glitches are distributed randomly in time, you would end up keeping 40% of such erroneous data (glitches in either the first 20% or final 20% of the real period).
    Another correction would be to estimate the period interrupted by the glitch. Start by assuming no more than one glitch per legitimate period. Since the glitch subdivides the true period into a pair, you can re-create the true interval by summing the pair of periods. The catch is to identify which pair needs summing.
    The smaller of the pair will show a period <= 50% of the real period, and can be identified. However, the larger of the pair cannot always be identified. The larger of the pair can be anywhere from 50%-99.999% of the real period and may located either right before or right after the smaller of the pair. If you wish to recreate the real period, you'll need to make a mathematically educated guess about which adjacent period to consider as the "larger of the pair."
    This is tricky enough as a post-processing exercise, but it's even worse when you process the data as it comes in. Then there will be times where the last element in the buffer is the "smaller of the pair" and you don't yet have the "larger of the pair" data. There will also be (rarer) times when the last element is the "larger of the pair" but you can't yet know that it needs to be summed with the next "smaller of the pair" measurement.
    Now consider a case where there could be two or more glitches inside true period. You'll need to evaluate the best choice of summing any two, three, four, etc. consecutive periods to reconstruct the real period. {note that for n glitches and a +/-20% acceptance criteria, then (2/5)^n of the glitched intervals will produce one measurement within the +/-20% bounds.} In such a scenario, I would advise working *really hard* on eliminating the glitches at the source.
    Whew, that's a mouthful and a half! Reply if you'd like an outline for an alternate approach, involving buffered semi-period measurement...

  • I want to play video on my computer to make some analysis to frames,the problem that I face ,I can't change video frame rate using labview,but I can change frame rate to the video out of labview using some program

    HI All
    I want to play video on my computer to make some analysis to it's frames,the problem that I face ,I can't change video frame rate using labview,but I can change frame rate to the video out of labview using some program .
    I used IMAQ AVI Read Frame VI
    for example I have avi video It's frame rate is 25 fbs ,my image processing code is very fast that can process more 25 fbs,so I want to accelerate video acquisition

    Hi abdelhady,
    I looked into this further, and reading an AVI file into LabVIEW faster than its frames per second won't be possible. LabVIEW could read in frames faster than 25fps, but because it will be pulling the available frame at that point in time this would just give you duplicate frames. If you want to be able to read in frames at faster than 25fps, you would need to speed up your AVI file before reading into LabVIEW.
    There's a good shipping example to show how to read in from an AVI file, "Read AVI File.vi". You'll notice that they add timing to make sure that the while loop runs at the right speed to match up with the frames per second of the file being read. This is to make sure you're not reading duplicate frames.
    Thank you,
    Emily C
    Applications Engineer
    National Instruments

  • What are some of the best iOS apps can remotely played videos, audios, photos and text files from a NAS hdd connected to Airport Extreme USB port? And how to configure this setup?

    I have already set up NAS hdd as connecting it at USB port of Airport Extreme, i also want to remotely access it from iPhone, so what's the next step? What are some of the best iOS apps can remotely played videos, audios, photos and text files from the NAS hdd and how to configure this setup?

    *Edit - I am not able to connect to the NAS when hardwired to the airport extreme.

  • How can I make the marker event pulse width longer in NI-FGEN?

    I want to generate a marker event on PF0 line using NI-FGEN.I can set the marker event pulse width but when I was trying to make the pulse width units as 65 I was getting an  error-1074115931. 
    How can I make the marker event pulse width longer without using script as I am using PXI-5412 which is not supporting Script.
    Can anyone help me out in doing the same?

    Unforunately, as you mentioned, the PXI-5412 does not support scripting mode. This will limit you to 1 marker using sequence mode. However, the PXI-5421 and PXI-5422 would allow the functionality. 
    As far as making the pulse width longer, and as the KnowledgeBase Article that you linked to discusses, I don't think it will be possible to create a marker as long as 1us - 10ms using just the Marker properties and without using scripting. You can still try to do this with property nodes and see if you can get a usable result. Start with an example such as "Fgen Arb Waveform Marker" and use the "Marker Position" value to set the start time (you would want 0 here it looks like), and then "Marker Event Pulse Width Value" to change the pulse length, but again I am afraid you will probably reach the maximum of 640 ns here. If you're not able to get this going with the property node, you will need either a FGEN card that supports scripting or another card that does Digital I/O to accomplish this. 
    Thanks!
    Stephanie S.
    Application Engineer
    National Instruments

  • Connecting a USB input of a Battery Management system sending CAN messages to Labview

    I am new in working in Labview..... some guidance will be highly appreciated. ....
    I have a Battery management system. It sends CAN signals via a USB interface. I need to control the Battery management system using Labview. So how do i read the CAN signals coming from usb in labview. I am not using a Data acquisition system of NI as my signals are already digital. 

    Hey marco 
    The device has an application which is runs it. So this application runs the battery management system. What i need to do is to develop a LABVIEW substitute for this application, so that I will be able to communicate with the BMS using LABVIEW, instead of the application provided with it.

  • HT4910 I try to restore my iPhone last week but I find out that I had lost/missing a lots of photos and messages that I perviously took and send. can iCloud help mr on this?

    I try to restore my iPhone last week but I find out that I had lost/missing a lots of photos and messages that I perviously took and send. can iCloud help mr on this?

    me too

Maybe you are looking for