IO_Rack Posted July 21, 2016 Report Posted July 21, 2016 I want to create an Array or a Structure in the NJ that I can access in the NA5 as BOOL and as DWORD. The easy answer is to create a UNION. I tried this and cannot access a BOOL[x] element from the NA5. Am I missing some simple syntax or is this not possible? An alternative solution was to use a Structure, which works well in the NA5 for accessing members but I cannot compare the Structure to a value. So now I'm trying to break it out using the ToAryByte function. I read in a previous post that it works. (There were no details). Below is the error I receive. The G_Traverse_01_Faults is a 'Fault' Structure shown below. I haven't though about where I would go from here but I can't get passed step 1. The instruction reference states the 'In' will accept a Structure or Structure member. I've over thought this to point where I am clueless. Is it possible to convert my Structure to a comparable number? Quote
Crossbow Posted July 21, 2016 Report Posted July 21, 2016 Don't forget in the HMI it's .NET rules, so the array index is in parentheses not square brackets. Not sure if that helps or not... Quote
IO_Rack Posted July 21, 2016 Author Report Posted July 21, 2016 That's great advice because I did forget. The moment I read your post, I had remembered reading that in a previous post. This solved my Array issue which I'll probably use over the Structure. For my reference, I would still like to know why I can't get the example (pictured above) to work. Thanks for the reminder, Crossbow! Quote
Andy_P Posted July 22, 2016 Report Posted July 22, 2016 10 hours ago, Crossbow said: Don't forget in the HMI it's .NET rules, so the array index is in parentheses not square brackets. Not sure if that helps or not... Just to be extremely picky, this is not a .NET rule per se, but a VB rule. C# uses square brackets. It's a pity (IMHO) that the NA screen cannot use C# as the macro language as well as VB, but that's just my preference. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.