Red Lion HMI code help needed.
I am posting to this board first time with a request for some help with an industrial HMI (touchscreen) that interfaces with a programmable computer. My specific request is for someone to help me with retrieving values that are stored to a CompactFlash card. I am able to store values (we call them recipes) to the CompactFlash card as .csv file. I just haven't been able to figure out the code to retrieve this information back to the touchscreen.
Let me first post my code that stores the recipes; (it works as intended)
Code:
// Create a new folder if it doesn't exist
CreateDirectory("/recipes");
//Create the file if it doesn't exist
CreateFile("/recipes/recipe.csv");
//open the file
hfile = OpenFile("/recipes/recipe.csv", 2);
//Write each recipe as a line in the file
//Copy each array index as a file line beginning by therecipe index
for (i = 0; i < 100; i++) {
WriteFileLine(hfile, AsText(i) + ","
+ OutsideDiameter[i].AsText + ";"
+ RecipeOD[i].AsText + ";"
+ WallThickness[i].AsText + ";"
+ RecipeWall[i].AsText + ";"
+ GapRoll1[i].AsText + ";"
+ GapRoll3[i].AsText + ";"
+ GapRoll5[i].AsText + ";"
+ GapRoll7[i].AsText + ";"
+ GapRoll9[i].AsText + ";"
+ AngleRoll1[i].AsText + ";"
+ AngleRoll3[i].AsText + ";"
+ AngleRoll5[i].AsText + ";"
+ AngleRoll7[i].AsText + ";"
+ AngleRoll9[i].AsText + ";"
+ AngleRoll2[i].AsText + ";"
+ AngleRoll4[i].AsText + ";"
+ AngleRoll6[i].AsText + ";"
+ AngleRoll8[i].AsText + ";"
+ AngleRoll10[i].AsText + ";"
+ DeflectRoll4[i].AsText + ";"
+ DeflectRoll6[i].AsText + ";" + DeflectRoll8[i].AsText);
}
//Close the file
CloseFile(hfile);
Now with that said, I would like to retrieve these values from the .csv file.
I am a newbie to c programming so please bear with me as I try to process any help rendered to me.
Thanks in advance,
Jfls45