06-26-2009 03:34 AM
Hi All,
Can anyone please help me in finding what is the difference between these two CAN library functions(ncwriteobj.vi and ncwritenet.vi).
Does ncwriteobj.vi writes data on to the write queue...... and ncwritenet.vi on to the can bus.
Please elaborate.....or provide some suitable link or example.
Also if it is required to read a particular Index and sub index continuously for a particular time interval........ncreadmulti.vi will work or have to use a loop....
06-28-2009 11:11 PM
06-29-2009 01:19 AM
I recommend to read the NI-CAN Hardware and Software Manual, esp chapter 9
"Using the Frame API" gives helpfulinstructions of the various object types. For all object typesyou ll find examples within the LabVIEW example finder.
06-29-2009 02:24 AM
Hi Gibson....
thanks for your reply.........i had already gone through that pdf's chapter 9 but not able to find it very clearly the difference in working of the two objects.......
Can u pls through some light regarding my first question if had gone through that pdf....
07-01-2009 02:50 AM
ncwriteobj.vi refers to the usage of a CAN Object.
The CAN Object encapsulates a specific CAN arbitration ID and its
associated data. Every CAN Object is always associated with a specific CAN Network
Interface Object, used to identify the physical interface on which the CAN
Object is located. The CAN Object provides high-level access to a specific arbitration ID.
You can configure each CAN Object for different forms of background
access. For example, you can configure a CAN Object to transmit a data
frame every 100 milliseconds, or to periodically poll for data by
transmitting a remote frame and receiving the data frame response. The
arbitration ID, direction of data transfer, data length, and when data transfer
occurs (periodic or unsolicited) are all preconfigured for the CAN Object.
When you have configured and opened the CAN Object, data transfer is
handled in the background using read and write queues. For example, if the
CAN Object periodically polls for data, the NI-CAN driver automatically
handles the periodic transmission of remote frames, and stores incoming
data in the read queue of the CAN Object for later retrieval by the ncRead
function. For CAN Objects that receive data frames, the ncRead function
provides a timestamp of when the data frame arrived, and the data bytes of
the frame. For CAN Objects that transmit data frames, the ncWrite
function provides the outgoing data bytes
ncwritenet.vi refers to the usage of the Network Interface Object
You use the CAN Network Interface Object to read and write complete
CAN frames. As a CAN frame arrives from over the network, it can be
placed into the read queue of the CAN Network Interface Object. You can
retrieve CAN frames from this read queue using the ncRead or
ncReadMult function. The read functions provide a timestamp of when
the frame was received, the arbitration ID of the frame, the type of frame
(data, remote, or RTSI), the data length, and the data bytes. You also can
use the CAN Network Interface Object to write CAN frames using the
ncWrite function.
In addition check the basic NI-CAN Frame API examples in the example finder.
gibson