Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

simulating inputs on PCI-6527

Hello!

I have a question regarding PCI-6527 board simulatuion. Is it possible to simulate inputs of the device, when the application is written with Visual C++? How?
I have installed the latest DAQmx driver (8.2 I believe) and I have created simulated device.

Thank you for your replies.

The link to original thread and reply: http://forums.ni.com/ni/board/message?board.id=210&message.id=496#M496

My reply to that.
I am aware of the fact, that inputs should be simulated. However, I do use callback function and , well, to be honest, it doesn't get called at any time. Although it probably should right away. My device name is Dev1 and DAQmx functions I use in my application return 0, which means there was no error.
Any ideas if I set something up wrongly. Otherwise, I will post some source code of the application later this day.
0 Kudos
Message 1 of 11
(5,338 Views)
Hi kovalenkov,
 
Quick question: which callback function are you using?  Depending on the call, some interrupts can be generated by the driver, and others directly from the hardware.  I'm honestly not sure what happens with a simulated device and a hardware generated interrupt, I'll have to look into it.  Knowing the function you are using will give me a good place to start...
 
Thanks,
 
Justin M.
National Instruments
0 Kudos
Message 2 of 11
(5,327 Views)
I setup the callback function like this:
'DAQmxRegisterSignalEvent (m_hTask, DAQmx_Val_ChangeDetectionEvent, 0, &CBInputChange, this);'

And the callback function is declared like this:
'static int32 CVICALLBACK CBInputChange (TaskHandle hTask, int32 nSignalID, void *pCallbackData);'

I hope that is what you wanted to know.
0 Kudos
Message 3 of 11
(5,325 Views)
Hi kovalenkov,
 
I double checked on this, and I confirmed that simulated devices do not support events.  The change detection event will not fire for a simulated device even though the simulated data is changing.  You would need the actual hardware to generate the event. 
 
Thanks,
 
Justin M.
National Instruments
Message 4 of 11
(5,315 Views)
Thank you for your effort.
Now, at least I don't have to wonder why the thing deosn't work 😉

Thank you again.
0 Kudos
Message 5 of 11
(5,310 Views)

HELLO ALL,

CAN SOMEBODY HELP ME FOR SIMULATION OF THIS INTERFACE(MULTI FUNCTION VEHHICLE

BUS,PC/104:PROFIBUS,CANOPEN INTERFACE,RS -232,RS-485) WITH CPCI BACK PLANE.

IT'S TYPE OF DATA RECODER APPLICATION IN RAILWAY'S, I WANT TO SIMULATE THIS INTERFACE WITH

REAL TIME APPLICATION IN LABVIEW, & I AM BEGINER TO LABVIEW. IF SOME EXAMPLE'S AVIALABLE PLZ SEND ME.

BEST REGARDS

ARIF.

email:-arifahmedmd@infotechsw.com

0 Kudos
Message 6 of 11
(5,245 Views)
Hi Arif,

I'm not sure how this is related to the rest of the thread.  It might be best for you to create a new thread on the appropriate board.

Also, when you say you are trying to simulate the interface, are you trying to do something in software, or hardware?  I think it would be best if you started a new thread and expanded a bit on what you are trying to do.

Have a great day!

Adam W
National Instruments
0 Kudos
Message 7 of 11
(5,176 Views)
Hello Adam,
 

Iam currently working on Labview and new to this Labview.

It's type of data recorder application in locomotives and i have to simulate signal to my hardware.

sub modules of this data recorder are:

Profibus

MVB bus (multi vehicle bus)

I/O modules

In i/o modules we will be needing the below mentioned signals:

3 Frequency inputs to data recorder

2 Analog inputs to data recorder

4 Digital inputs to data recorder

2 Analog outputs from data recorder

6 Digital frequency outputs from data recorder

12 Digital inputs to data recorder

4 Relays

We will be needing to generate and read all the above mentioned signals in Lab view using TCL(Tool Command Language) script language.

And also we will be needing to communicate to MVB bus card and Profibus card using Lab view and we need to implement these two protocols in Lab view using TCL script.

We will be grateful if you can help us in this regard.

Arif

0 Kudos
Message 8 of 11
(5,170 Views)
Hi Arif,

Your application sounds like it covers many areas.  If you are new to LabVIEW you may want to familiarize yourself with it before you begin coding.  There are various tutorials and example programs online for different applications.  A good basic tutorial is the three hour LabVIEW Introduction Course.

Also, if you are looking for someone to set this system up for you, National Instruments has an Alliance Network that consists of hundreds of developers, integrators, and industry experts that offer solutions to customers.

There are some other forum posts that discuss using TCL in LabVIEW.  There is not a built in interface for it.  You would basically have to access the script from a dll.

Hopefully this is a starting place.

Regards,

Adam W
0 Kudos
Message 9 of 11
(5,131 Views)

Hello Adam

My Application is read script file from TCL for different interface and update(display)or configure the data in front panel of GUI through that i have to select the port of different interface depending on input's range.

our interface are:

MVB BUS

PROFIBUS

CANOPEN CARD

ANALOG I/O CARDS (two analog input's and two analog output's)

DIGITAL I/O CARDS ( two digital input's and two digital output's)

RS 232

RS 485

I have found 1 vi from NI disscusion form,from which will read the TCL script and display in output string, iam attaching that vi with this mail, plz u go through and find it suitable for my application for read script file for different interface.

Regards

ARIF

0 Kudos
Message 10 of 11
(5,097 Views)