Hi Mahmoud,
The examples that ship with LabVIEW and the DAQmx drivers are very detailed and comprehensive in demonstrating how you can use the cards. To get to the Example Finder, start LabVIEW and go to Help > Find Examples.
When the Example Finder is loaded, make sure you are browsing by Task.
For DIO programming:
Browse to Hardware Input and Output > DAQmx > Digital Measurement. There are some example VIs there. Make sure that you look through the Requirements list to see that the example works with the PXI-6515.
You can also refer to these links to learn more about programming in DAQmx:
Getting Started with NI-DAQmx
http://zone.ni.com/devzone/cda/tut/p/id/5434
Learn 10 Functions in NI-DAQmx and Handle 80% of Your Data Acquisition Applications
http://zone.ni.com/devzone/cda/tut/p/id/2835
For Serial programming:
Browse to Hardware Input and Output > Serial
You will find that most of the example VIs there can be used with the PXI-8431.
Hope that helps get you off the ground!
Rasheel