LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

waveform change, nctwrite

Hi

I use NI-CAN in labview. When I try to output a waveform to the bus,
I have got a problem in waveform change. I can successfully transmit
the waveform in shipping example. But I can't find anywhere that I
can change the waveform to myown design. Can anybody give me any
suggestion about this?

Thanks in pervious.

johnshi
0 Kudos
Message 1 of 6
(2,843 Views)
Hi,

I'd like to take this forum to give some suggestions to NI-CAN products.

(1) In the NI-CAN manual, page 3-21 (PCMCIA-CAN) . It write:

"Bus power requirements
Becasue the high-speed physical layer is completely powered internally,
there is no need to supply bus power".

However, when I bought a PCMCIA-CAN with a cable, I got a problem that
the cable needs a power supply. Although I solved the problem under the
help of this forum, I'd like to suggest that the editor of this manual
to change this confusing sentence. I suggest to mention about the
differece between the internally powered and bus powered cable.

(2) When you send the first quotation, you should mention about this
difference before you change the manual explanation.

(3) I meet many errors when I try my application. A help window is
very helpful to give the reason. But I'd like to suggest the help
window designers to add some solution clue after the reason. That
will make the help window more powerful.


Thanks

johnshi
0 Kudos
Message 2 of 6
(2,839 Views)
Hi johnshi,

I assume that you use the 'Waveform Output' example VI?
The waveform graph on the front panel is just a different visualization of a 2-D array. So, in order to write out your own data, you just need to provide a different 2-D array: One set of values for the TransmissionOilPressure channel and one for the TransmissionFilterPressure channel.
Please see the attached screenshot for an example.

-B2k
0 Kudos
Message 3 of 6
(2,834 Views)
Thanks, B2k

I sorted the problem with your code. However, I still have some question
about this.
(1) Why I can't find any similar loop in the shipping example?
(2) When I try to replace the loop with a waveform, the connection will break,
and an error information comes out. I don't know the reason and how to solve it.
Hereby I attach my code, can you please have a check and tell me what is wrong?

Thanks

Johnshi
0 Kudos
Message 4 of 6
(2,819 Views)
Hi Johnshi,

CAN Write VI is not comatible with the waveform data type. In contrast to a simple array of values, it also contains t0 (the trigger time of the waveform) and dt (the time interval between data points in the waveform). So, it's essentially a cluster of t0, dt and an array of values (and an attribute).
In order to pass the values to the CAN Write VI, you need to extract the values from the waveform data type.

-B2k
0 Kudos
Message 5 of 6
(2,809 Views)
Here's the VI and the .ncd file.

-B2k
0 Kudos
Message 6 of 6
(2,807 Views)