Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9216819
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T02:29:52+00:00 2026-06-18T02:29:52+00:00

I have built an Instrumentation Cluster with the NVIDIA UI Composer Studio. To control

  • 0

I have built an Instrumentation Cluster with the NVIDIA UI Composer Studio.
To control animations it uses the Lua Scripting Language. Now I’m really new to Lua and my question is the following:

I’ve got the following Code sequence in Lua which controls my Speedometer:

self.vehicleSpeedData = {} — A lot of Values are put in here

function self.speedSim( inFrame, theController )

local timeInSec, dummy
timeInSec, dummy = getElapsedTime()
-- data based on 60fps
actualFrameNumber = math.floor(timeInSec * 60)
local theSample = ((actualFrameNumber-1) % #self.vehicleSpeedData) + 1
theController.value = self.vehicleSpeedData[theSample] *0.06    

end

The array in this example is empty. So as you can see, the function reads out the Values of the Array.

But what I need is, that I can get this Data from an external Source (Such as RS232 or CAN Simulation) … What I want to try is, if I can put Data from C# for example to that Lua Script.

It is hard do explain what I exactly want. My idea is that this Lua Script above listens and reads Data which I dynamically read in C# from my Data Source.

Thanks a lot for your help. This work is for my Bachelors Degree and I’m stuck at this point a long time and I’m nearly out of ideas.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T02:29:53+00:00Added an answer on June 18, 2026 at 2:29 am

    It all kind of depends on what that Nvidia thing exposes to the user (in terms of API, and Lua base libraries).

    Assuming it is available, you can use io.read to read in a datafile (say a csv) from another source, then parse it yourself into your table. If you can preprocess the file to have a valid Lua syntax (eg prepend a return {, have values separated by , , and end with a }, you could directly load the string with loadstring).

    If they allow you to, you could use external libraries for interfacing with RS232, Excel, sockets, whatever.

    PS: it’s Lua not LUA (not an acronym, but the Portuguese noun for Moon ;))

    Edit: example mkfifo

    so in Linux it goes like this: make a fifo with mkfifo fff and feed it something echo ‘ ‘> fff to prevent Lua from blocking.

    In Lua:

    fh=io.open('fff','rb')
    while true do
        res = fh:read()
        if res then
            print(res)
        end
    end
    

    Whatever cat into fff (eg cat 10 > fff) will come out in Lua. this way you can read out any available values and use them at each run of your function.

    Another option is using standard input, but I’m not sure whether this composer thing lets you.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built up a website without any server side scripting/language, using only HTML/JavaScript/jQuery.
I have built a site which requires user to login. Now I have decided
I have built a jQuery Plugin, but now I need to use one function
I have built a web setup project in Visual Studio. When it is installed
I have built a web application that uses a service account linked to my
I have built my database in SQL Server 2005 Management Studio and in deployment
I have built a quite big rails application. Now I have a lot of
I have built so far an application that allows the user to drag and
I have built up an array of objects, created from a class, I wrote
I have built a local DVD Database using Codeigniter, With film names etc in.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.