06-25-2023 01:49 PM
Hello friends,
I am a graduate student and I need to implement control of a hydraulic system for my project. I am using CRIO9074, NI9215 (Voltage Input Module), and NI9263 (Voltage Output Module) in the system.
I can control the output connected to analog channel 0 (A0) of CRIO9074 using a control block. However, I need to control the output based on amplitude values obtained from a notepad file. (Freq : 1Hz, Amplitude: Variable, Sample Time : 1ms)
When I open the application only in LabVIEW (not in the CRIO software), I can plot the signals from the notepad file as a graph. But when I redirect these signals to the analog output of CRIO9074, I cannot get any output.
The actuator does not move at all. What am I doing wrong or missing?
Can you please help me?
Thank you, regards
06-25-2023 03:01 PM
Hi batincan,
@btncan wrote:When I open the application only in LabVIEW (not in the CRIO software), I can plot the signals from the notepad file as a graph. But when I redirect these signals to the analog output of CRIO9074, I cannot get any output.
Without looking at your code: do you deploy that text file to the cRIO?
Otherwise that cRIO has NO access to the file as long as it is located on your computer harddrive...
06-25-2023 04:13 PM
Hi, GerdW
First of all, thank you for your suggestion.
To be honest, I didn't know that CRIO couldn't read files from the computer's drive.
I have included the .txt file containing amplitude values ranging from 0V to 2V in the project directory. And I directly connected the output of the file reading to CRIO-A0 (Attached).
Thank you again. I will share the result.
Best regards.
06-26-2023 12:54 AM
Hi batincan,
@btncan wrote:
To be honest, I didn't know that CRIO couldn't read files from the computer's drive
The cRIO is a computer on its own. By default computer A has NO ACCESS to the harddrive of computer B - think about security and malicous software…
Please take the basic courses about LabVIEW realtime!
@btncan wrote:
I have included the .txt file containing amplitude values ranging from 0V to 2V in the project directory. And I directly connected the output of the file reading to CRIO-A0 (Attached).
Placing the file in the project tree is nice, but doesn't do anything with it.
You need to deploy the file to your cRIO! (Again: do the Realtime basics!)
Then you need to use the correct file path in the cRIO VI: as already said the cRIO CANNOT access anything on the harddrive of your computer…
On that VI image: do you really need to read this fixed file again and again every millisecond? Why not read it once before the loop???
07-02-2023 01:51 AM
Hi GerdW,
I have rearranged the text file reading code block to execute it once.
I have read the posts on the forum under the title of "Crio data reading," but I couldn't find a clear example that explains the solution to the problem (although most of the responses suggest using FTP, I couldn't find a specific example).
Additionally, I was wondering if using the FPGA structure in Crio would be easier and provide accurate results for implementing such an application. Do you have any definite information on this?
Thank you in advance.
Best regards
07-02-2023 11:24 AM
Hi btncan,
@btncan wrote:
Additionally, I was wondering if using the FPGA structure in Crio would be easier and provide accurate results for implementing such an application. Do you have any definite information on this?
Using the FPGA usually helps to increase accuracy regarding timing behaviour as the FPGA code will execute within a specific timing. BUT it also adds one more level of complexity…
@btncan wrote:
I have read the posts on the forum under the title of "Crio data reading," but I couldn't find a clear example that explains the solution to the problem (although most of the responses suggest using FTP, I couldn't find a specific example).
LabVIEW (and the RT and FPGA modules) come with a lot of example VIs and example projects. There are several example projects explaining how to implement basic applications using realtime targets (like your cRIO) and even FPGA targets. They also explain how to implement communication between those 3 levels/places (computer, cRIO, FPGA) of computation. Examine all of them!
And there are Training resources offered by NI, like in the header of the LabVIEW board…