Building a Free HMI Part II

Cool video! Why did you have to read the data in as strings?

The code section could probably be made more clear, and done more quickly by zooming in on already typed in code, then explaining the lines. It's a bit hard to follow a letter by letter explaination.

As usual, good work!
 
Thanks for the feedback. I may remake the video using your advice. It will definitely make it easier to follow.

The DF1Comm is setup to return values as strings so that one method "ReadAny" can be used to return any data type.
 
Wow - Ask and you shall receive!

Archie said:
Video has been revised to help make the coding section easier to follow:


http://www.youtube.com/watch?v=1-5STcYWQ7k

What would it take to support more efficient array reads for cases like this graph? How many bytes is each string?

Archie said:
The DF1Comm is setup to return values as strings so that one method "ReadAny" can be used to return any data type.
 
Last edited:
surferb said:
What would it take to support more efficient array reads for cases like this graph? How many bytes is each string?

There is actually a method in the control named ReadInt that will return the values as integers.

I try to use the generic method ReadAny to make it easier for new users. If you use the ReadInt, you then have to make sure the result is stored in an array of integers and you are reading an integer table from the PLC, otherwise you get an exception.

By returning a string array, it doesn't matter which data table type you read. For example B, N, ST, F file types will all return values that safely go into a string.

You'll see that works nicely when using the PLC Utilities example where the user can put in any PLC address and it returns the value with the same line of code no matter what data type is returned.
 

Similar Topics

Hello everyone, I am a student and would like to take the next step and learn FactoryTalk (Batch preferably) and how to create HMIs etc. Would...
Replies
4
Views
491
Hi all Trend seemed to have carved a niche in building controls. The controllers seem expensive and inflexible, in the words of a Trend user. Do...
Replies
1
Views
489
I have a 24" plotter that we print out full scale backpanels and transfer all the holes to a backpanel for faster layout and build time. Does...
Replies
11
Views
1,627
Anyone building cabinets according to Korean standards? What to think about? Do you need to use components with Korean approvals?
Replies
0
Views
835
General question for everyone. I'm finishing up some industrial electrician training in the next couple years and then plan to open up my own shop...
Replies
2
Views
1,564
Back
Top Bottom