DeviceNet versus CAN

I understand that DeviceNet is built on top of CAN. So does this mean a program written to work on a CAN card will by default work on a
DeviceNet card?
I am asking because I have a program written for a National Instruments PCI-CAN card and the same program dont seem to run on a National Instruments DeviceNet card.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
Add image file
Upload is a website by engineers for engineers. It is not affiliated with any of manufacturers or vendors discussed here. All logos and trade names are the property of their respective owners.