VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Frequency modulation for Veristand

Solved!
Go to solution

Good Morning everyone,

 

at first sorry for my bad English. I’m new to Veristand and NI Hard and Software in general, so it may be an trivial question.

 

I have a PXI-8176 controller with my System definition file. I also have PXI-6528 and PXI-6229.

 

My model generates an analog Signal from 0V up to 3,5V and I like to modulate a frequency with that Signal. At 1V like to have 650 pulses per second, at 2V 1300 pulses and 2275 pulses at 3,5V. This frequency is way to high to be generated from my Model, so it must be done by Hardware. My question is: is it possible to configure my Hardware to generate such a frequency and how can I do this?

 

With best regards

 

Roman

0 Kudos
Message 1 of 11
(8,744 Views)

Roman,

 

unfortunately it is not possible to configure a pulse generation in NI VeriStand.

The workaround to go is to create your own NI VeriStand Custom Device that takes as input parameter the model output value and converts it accordingly to your LUT.

In you specific case I recommend to implement an asychronous custom device.

 

The DAQmx code to change the frequency on the fly would look like the one that is posted here:

http://decibel.ni.com/content/docs/DOC-3613

 

 

Let me know if you have any further questions!

Tom

0 Kudos
Message 2 of 11
(8,740 Views)

Hello Tom,

 

thank you for your fast reply. I have indeed some questions. I tryed create a Custom Device with 1 input for my signal. I also tryed to route the generated pulse on the out port of the counter0. It didnt worked out very well.

 

This is what i did:

 

19287iC75060FCAE596051

I configured the initialization VI like this. And this my RT Driver VI:

 

19289i41A61D2D4367B5F5

 

Then i build the VI´s. Finally i started Veristand, conneted the Custom Device input to my Signal and tryed to Deploy and got an Error 7 Message. I really do not know what is wrong or what i can do from here. Can you please help me?

 

With best regards

 

Roman

 

0 Kudos
Message 3 of 11
(8,685 Views)

Roman,

 

can you be a little bit more specific about error 7. Usually it reports which file cannot be found.

I assume that you have used the template tool which gets installed with NIVS2009. In that case all files (llb's and XML file) should be copied to the proper place.

 

If u need further assistance, pls upload the content of the destination folder that you have set in the template tool (ensure that the XML file is included as well!).

 

Tom

(super angenehme temperaturen sind in deutschland wieder - das braeuchten wir hier auch!)

 

0 Kudos
Message 4 of 11
(8,679 Views)

Hallo Tom,

 

i tryed to follow the Custom Devide tutorial and i did use the template tool. But in thnik i didnt understod it very well. I dont get any additional VIs for my channel and my section. So suppose i did something wrong right from the start.

 

I uploaded the Error 7 message for you:

19359iBEA0688D228DB8C2

 

I also attached my custom device project folder and the XML from my the Veristand custome device folder.

 

Roman

 

[Was hat mich verraten? 😄 Ja hier ist es in der Tat etwas muckelig, so fast etwas zu warm. Es soll Heute wieder 32° werden, ist es denn in den USA im moment so kühl? Ich kann dir auch gern noch mal eine Mail auf Deutsch schicken, vielleicht kann ich mein Problem dann besser erklären.] 

0 Kudos
Message 5 of 11
(8,656 Views)

Hallo Tom,

 

i tryed to follow the Custom Devide tutorial and i did use the template tool. But in thnik i didnt understod it very well. I dont get any additional VIs for my channel and my section. So suppose i did something wrong right from the start.

 

I uploaded the Error 7 message for you:

19359iBEA0688D228DB8C2

 

I also attached my custom device project folder and the XML from my the Veristand custome device folder.

 

Roman

 

[Was hat mich verraten? :smileyvery-happy: Ja hier ist es in der Tat etwas muckelig, so fast etwas zu warm. Es soll Heute wieder 32° werden, ist es denn in den USA im moment so kühl? Ich kann dir auch gern noch mal eine Mail auf Deutsch schicken, vielleicht kann ich mein Problem dann besser erklären.]

0 Kudos
Message 6 of 11
(8,654 Views)

Hey Roman,

 

your project as well as the created LLBs look just fine.

I run it on localhost and on an RT box and it works perfectly fine on my side. I just talked to an AE in Germany to ask him to check it on a PC with a german OS. He will get in touch with you asap.

 

 

Thanks,

Tom

(Screenshot: DAQmx - Kanal)

0 Kudos
Message 7 of 11
(8,605 Views)

Hi Roman,

 

I downloaded your code and will have a look on it to see where error 7 comes from. As far as I have any news I'll let you know

 

Kind regards

Carsten

NI Germany

0 Kudos
Message 8 of 11
(8,604 Views)

Hey Roman,

 

I was able to run your project on a localhost and a RT System too. I just downloaded your project, compiled the two build specifications and created a new workspace file where I added your custom device.

Can you try reinstalling the software on your RT target and check if you still get the error?

 

Kind regards

Carsten

NI Germany

0 Kudos
Message 9 of 11
(8,591 Views)
Solution
Accepted by topic author Coity

Hi Roman,

 

after playing around a little bit I was able to reproduce error 7

Did you build the source distributions for both build specifications, Configuration and Engine? I tried it without building the engine and then I got error 7.

Just rightclick the Engine build specification and choose Build.

19661i345B74213273B088

 

 

After that I was able to run your custom device.

Please let me know if it is working

 

Kind regards

Carsten

0 Kudos
Message 10 of 11
(8,576 Views)